conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
456 stars 101 forks source link

CI test for macos sometimes fails in test_it_uses_pip_repositories_with_env_var_substitution #591

Closed maresb closed 4 months ago

maresb commented 5 months ago

Checklist

What happened?

This only happens some of the time. Maybe some sort of race condition?

_ ERROR at teardown of test_it_uses_pip_repositories_with_env_var_substitution[conda] _
[gw3] darwin -- Python 3.12.1 /Users/runner/micromamba/envs/conda-lock-dev/bin/python3.12

    @pytest.fixture(scope="module")
    def private_package_tar():
        tar_path = _PRIVATE_PACKAGE_SDIST_PATH.parent / "fake-private-package-1.0.0.tar.gz"
        with tarfile.open(tar_path, "w:gz") as tar:
            tar.add(
                _PRIVATE_PACKAGE_SDIST_PATH,
                arcname=os.path.basename(_PRIVATE_PACKAGE_SDIST_PATH),
            )
        try:
            yield tar_path
        finally:
>           os.remove(tar_path)
E           FileNotFoundError: [Errno 2] No such file or directory: '/Users/runner/work/_temp/tests/test-pip-repositories/fake-private-package-1.0.0.tar.gz'

tests/test_pip_repositories.py:54: FileNotFoundError

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

No response