1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2024-12-24 09:06:15 +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()) kwargs.setdefault("cwd", os.getcwd())
q = ("-q",) if quiet else () q = ("-q",) if quiet else ()
env = dict(os.environ) env = dict(os.environ)
env.pop("TOX_WORK_DIR") env.pop("TOX_WORK_DIR", None)
kwargs.setdefault("env", env) kwargs.setdefault("env", env)
try: try:
print("current", os.getcwd(), "running in", kwargs["cwd"]) print("current", os.getcwd(), "running in", kwargs["cwd"])