Skip to content

Commit

Permalink
Merge pull request #184 from jaimeMF/fix_tests_on_python_312
Browse files Browse the repository at this point in the history
Fix and enable tests on python 3.12
  • Loading branch information
raimon49 committed Mar 17, 2024
2 parents f7d4cf4 + d48c336 commit e3a3d87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ tomli==2.0.1
# pytest
twine==4.0.2
# via -r dev-requirements.in
typing-extensions==4.4.0
typing-extensions==4.10.0
# via
# black
# mypy
Expand Down
5 changes: 4 additions & 1 deletion test_piplicenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,10 @@ def post_setup(self, context: SimpleNamespace) -> None:
package_names = sorted(set(p["name"] for p in pkgs))
print(package_names)

assert package_names == ["pip", "setuptools"]
expected_packages = ["pip"]
if sys.version_info < (3, 12, 0):
expected_packages.append("setuptools")
assert package_names == expected_packages


def test_fail_on(monkeypatch) -> None:
Expand Down

0 comments on commit e3a3d87

Please sign in to comment.