From 5fce9a01e446cb8f6aa4162c51467e09fe45cfa1 Mon Sep 17 00:00:00 2001 From: Andrew Grigorev Date: Sun, 2 Jun 2019 15:41:21 +0300 Subject: [PATCH] tests: fix for pytest>=4.6.0 caplog --- setup.py | 10 +++++----- tests/func/test_add.py | 2 +- tests/func/test_data_cloud.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index ff4465b511..d8a0c4972a 100644 --- a/setup.py +++ b/setup.py @@ -77,11 +77,11 @@ def run(self): "wheel>=0.31.1", "pydot>=1.2.4", # Test requirements: - "pytest==4.4.0", - "pytest-timeout==1.3.3", - "pytest-cov==2.6.1", - "pytest-xdist==1.26.1", - "pytest-mock==1.10.4", + "pytest>=4.6.0", + "pytest-timeout>=1.3.3", + "pytest-cov>=2.6.1", + "pytest-xdist>=1.26.1", + "pytest-mock>=1.10.4", "flaky>=3.5.3", "mock>=3.0.0", "xmltodict>=0.11.0", diff --git a/tests/func/test_add.py b/tests/func/test_add.py index 0105c93da9..9cef92c8c1 100644 --- a/tests/func/test_add.py +++ b/tests/func/test_add.py @@ -114,7 +114,7 @@ def test_warn_about_large_directories(self): with self._caplog.at_level(logging.WARNING, logger="dvc"): assert main(["add", "--recursive", "large-dir"]) == 0 - assert warning in self._caplog.text + assert warning in self._caplog.messages class TestAddDirectoryWithForwardSlash(TestDvc): diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py index d0e20bbed1..987b7029ed 100644 --- a/tests/func/test_data_cloud.py +++ b/tests/func/test_data_cloud.py @@ -870,12 +870,12 @@ def setUp(self): checksum_bar = file_md5(self.BAR)[0] self.message_header = ( "Some of the cache files do not exist neither locally " - "nor on remote. Missing cache files: \n" + "nor on remote. Missing cache files: " ) - self.message_bar_part = "\nname: {}, md5: {}\n".format( + self.message_bar_part = "name: {}, md5: {}".format( self.BAR, checksum_bar ) - self.message_foo_part = "\nname: {}, md5: {}\n".format( + self.message_foo_part = "name: {}, md5: {}".format( self.FOO, checksum_foo )