charmed-kubernetes / pytest-operator

Apache License 2.0
6 stars 13 forks source link

Temporary directories created without args required in pytest 7.3.0 #107

Closed natalian98 closed 10 months ago

natalian98 commented 1 year ago

With the recent update of pytest to 7.3.0 (see changelog), pytest-operator in v0.22 is failing in some tests due to an error on setup:

Traceback (most recent call last):
  File "/home/runner/work/iam-bundle/iam-bundle/.tox/integration/lib/python3.10/site-packages/pytest_operator/plugin.py", line 149, in tmp_path_factory
    return pytest.TempPathFactory(
TypeError: TempPathFactory.__init__() missing 2 required positional arguments: 'retention_count' and 'retention_policy'

Some examples of failing tests: cos-lite bundle iam-bundle

A temporary solution is to pin pytest to 7.2.2.

addyess commented 10 months ago

@natalian98

Looks like that was resolved with this PR

I believe you should see improvement if you use pytest-operator > 0.23.0