Skip to content

Commit 35dd1fd

Browse files
authored
Fix version tests (#4329)
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.
1 parent d8b0373 commit 35dd1fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/func/test_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_info_in_repo(scm_init, tmp_dir, caplog):
1717
assert main(["version"]) == 0
1818

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

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

6363
assert re.search(r"DVC version: \d+\.\d+\.\d+.*", caplog.text)
64-
assert re.search(r"Platform: Python \d\.\d\.\d on .*", caplog.text)
64+
assert re.search(r"Platform: Python \d\.\d+\.\d+ on .*", caplog.text)
6565
assert re.search(r"Supports: .*", caplog.text)
6666
assert not re.search(r"Cache types: .*", caplog.text)
6767
assert "Repo:" not in caplog.text

0 commit comments

Comments
 (0)