Skip to content

Commit

Permalink
chore: make tests forward-compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Mar 10, 2024
1 parent e09a535 commit 87bbab1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,12 @@ def _factory(

poetry = Factory().create_poetry(project_dir)

locker = TestLocker(poetry.locker.lock, poetry.locker._local_config)
try:
# before https://github.com/python-poetry/poetry/pull/9133
locker = TestLocker(poetry.locker.lock, poetry.locker._pyproject_data)
except AttributeError:
# after https://github.com/python-poetry/poetry/pull/9133
locker = TestLocker(poetry.locker.lock, poetry.locker._local_config)
locker.write()

poetry.set_locker(locker)
Expand Down

0 comments on commit 87bbab1

Please sign in to comment.