We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd39887 commit cb781c6Copy full SHA for cb781c6
1 file changed
tests/test_converter.py
@@ -470,7 +470,10 @@ def test_version_in_init_matches_pyproject(self):
470
"""pyproject.toml version must match __init__.__version__."""
471
from pathlib import Path
472
473
- import tomllib
+ try:
474
+ import tomllib
475
+except ImportError:
476
+ import tomli as tomllib # Python < 3.11 backport
477
478
from json2sql import __version__
479
pyproject = Path(__file__).resolve().parent.parent / "pyproject.toml"
@@ -479,4 +482,4 @@ def test_version_in_init_matches_pyproject(self):
482
assert data["project"]["version"] == __version__, (
480
483
f"pyproject.toml version ({data['project']['version']}) != "
481
484
f"__init__.__version__ ({__version__})"
- )
485
+ )
0 commit comments