mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
* suppress Tqdm when isatty - fixes #2549 * fix tests * unconditionally disable Tqdm if not isatty - fixes https://github.com/iterative/dvc/pull/2550#discussion_r329386950 * add TQDM_DISABLE env var - update tests - add documentation * TQDM_DISABLE => TQDM_ISATTY * tests: mock.patch sys.stderr * TQDM_ISATTY => DVC_ISATTY as per https://github.com/iterative/dvc/pull/2550#discussion_r334565120 * dvc.progress.Tqdm file kwarg - fixes https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335706955 * dynamic env DVC_ISATTY - fixes https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335811454 * DVC_ISATTY in tests - fixes https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335811099 * re-add and abstract `env2bool` to `dvc.utils` - partially reverts commit 524a0df188f566fb3e103f6965f1b6ac9c530886 - fixes https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335811639 * env2bool tidy * rename DVC_ISATTY => DVC_IGNORE_ISATTY - fixes https://github.com/iterative/dvc/pull/2550#discussion_r335947382
21 lines
482 B
Python
21 lines
482 B
Python
import os
|
|
import sys
|
|
from subprocess import check_call
|
|
|
|
|
|
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
os.chdir(REPO_ROOT)
|
|
|
|
os.putenv(
|
|
"PATH", ":".join([os.path.join(REPO_ROOT, "bin"), os.getenv("PATH")])
|
|
)
|
|
os.putenv("DVC_HOME", REPO_ROOT)
|
|
|
|
params = " ".join(sys.argv[1:])
|
|
|
|
cmd = (
|
|
"py.test -v -n=4 --timeout=600 --timeout_method=thread --log-level=debug"
|
|
" --cov=dvc {params} --durations=0".format(params=params)
|
|
)
|
|
check_call(cmd, shell=True)
|