Skip to content

Commit

Permalink
Merge pull request iterative#1949 from Suor/tests-extra-processes
Browse files Browse the repository at this point in the history
test: never run updater nor analytics in tests
  • Loading branch information
efiop authored May 1, 2019
2 parents 40ace17 + 6e0e5b4 commit 755a8ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions tests/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
"PATH", "{}:{}".format(os.path.join(REPO_ROOT, "bin"), os.getenv("PATH"))
)
os.putenv("DVC_HOME", REPO_ROOT)
os.putenv("DVC_TEST", "true")

if len(sys.argv) == 1:
params = ""
else:
params = " ".join(sys.argv[1:])
params = " ".join(sys.argv[1:])

cmd = (
"py.test -v -n=4 --timeout=600 --timeout_method=thread --log-level=debug"
Expand Down
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
from git import Repo
from git.exc import GitCommandNotFound

from dvc.utils.compat import cast_bytes_py2
from dvc.remote.ssh.connection import SSHConnection
from dvc.repo import Repo as DvcRepo
from .basic_env import TestDirFixture


# Prevent updater and analytics from running their processes
os.environ[cast_bytes_py2("DVC_TEST")] = cast_bytes_py2("true")


@pytest.fixture(autouse=True)
def reset_loglevel(request, caplog):
"""
Expand Down

0 comments on commit 755a8ba

Please sign in to comment.