1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2024-12-23 16:46:14 +01:00

Don't assume the tests allways run via tox

This commit is contained in:
Miro Hrončok 2022-12-14 11:47:07 +01:00 committed by GitHub
parent 028ee0cfb4
commit c3497d2b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ def tox(*args, quiet=True, **kwargs):
kwargs.setdefault("cwd", os.getcwd())
q = ("-q",) if quiet else ()
env = dict(os.environ)
env.pop("TOX_WORK_DIR")
env.pop("TOX_WORK_DIR", None)
kwargs.setdefault("env", env)
try:
print("current", os.getcwd(), "running in", kwargs["cwd"])