From b4368feb3f25c3f905b1f146a3721ab6629af038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zawadzki?= Date: Thu, 22 Aug 2024 13:34:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20release=20workflow=20(#981?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 Fix `pytest` import outside of tests * 🔖 Bump version --- pyproject.toml | 2 +- src/viadot/utils.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7779c2150..e2405d1ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "viadot2" -version = "2.1.0" +version = "2.1.2" description = "A simple data ingestion library to guide data flows from some places to other places." authors = [ { name = "acivitillo", email = "acivitillo@dyvenia.com" }, diff --git a/src/viadot/utils.py b/src/viadot/utils.py index 957dc23fd..ee5526a28 100644 --- a/src/viadot/utils.py +++ b/src/viadot/utils.py @@ -11,7 +11,6 @@ import pandas as pd import pyodbc -import pytest import requests from requests.adapters import HTTPAdapter from requests.exceptions import ConnectionError, HTTPError, ReadTimeout, Timeout @@ -829,6 +828,8 @@ def skip_test_on_missing_extra(source_name: str, extra: str) -> None: source_name (str): The name of the source for which dependencies are missing. extra (str): The name of the extra that is missing. """ + import pytest + msg = f"Missing required extra '{extra}' for source '{source_name}'." pytest.skip( msg,