From c972d6f998e4e351077dd3eb34233305b2f7ecd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Tue, 4 Aug 2020 10:42:47 +0545 Subject: [PATCH] Fix version tests 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. --- tests/func/test_version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/func/test_version.py b/tests/func/test_version.py index 753d53e6ee..4c2ad5caad 100644 --- a/tests/func/test_version.py +++ b/tests/func/test_version.py @@ -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) @@ -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