Skip to content

Commit

Permalink
Fix version tests (#4329)
Browse files Browse the repository at this point in the history
Tests had checks for python version number, expecting it to be only
single digits, which was failing for me on 3.6.10 and might fail
in the future with Python 3.10.

I adjusted it to expect minor and patch version to be of multiple digits.
  • Loading branch information
skshetry authored Aug 4, 2020
1 parent d8b0373 commit 35dd1fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/func/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_info_in_repo(scm_init, tmp_dir, caplog):
assert main(["version"]) == 0

assert re.search(r"DVC version: \d+\.\d+\.\d+.*", caplog.text)
assert re.search(r"Platform: Python \d\.\d\.\d on .*", caplog.text)
assert re.search(r"Platform: Python \d\.\d+\.\d+ on .*", caplog.text)
assert re.search(r"Supports: .*", caplog.text)
assert re.search(r"Cache types: .*", caplog.text)

Expand Down Expand Up @@ -61,7 +61,7 @@ def test_info_outside_of_repo(tmp_dir, caplog):
assert main(["version"]) == 0

assert re.search(r"DVC version: \d+\.\d+\.\d+.*", caplog.text)
assert re.search(r"Platform: Python \d\.\d\.\d on .*", caplog.text)
assert re.search(r"Platform: Python \d\.\d+\.\d+ on .*", caplog.text)
assert re.search(r"Supports: .*", caplog.text)
assert not re.search(r"Cache types: .*", caplog.text)
assert "Repo:" not in caplog.text
Expand Down

0 comments on commit 35dd1fd

Please sign in to comment.