Skip to content

Commit

Permalink
Use tomllib
Browse files Browse the repository at this point in the history
  • Loading branch information
gediminasz committed Jun 30, 2023
1 parent c6cd2c8 commit 6f80b57
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/misc/test_version.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import tomli
try:
import tomllib
except ImportError: # TODO remove this workaround when Python 3.10 support is dropped
import tomli as tomllib

import slskit


def test_version_in_module_matches_pyproject():
with open("pyproject.toml", "rb") as project_file:
project = tomli.load(project_file)
project = tomllib.load(project_file)
assert slskit.__version__ == project["tool"]["poetry"]["version"]

0 comments on commit 6f80b57

Please sign in to comment.