diff --git a/tests/func/test_checkout.py b/tests/func/test_checkout.py index aa1129aaf..d6f1f5169 100644 --- a/tests/func/test_checkout.py +++ b/tests/func/test_checkout.py @@ -428,10 +428,10 @@ class TestCheckoutShouldHaveSelfClearingProgressBar(TestDvc): finish_bar = progress_bars[-1] self.assertEqual(4, len(update_bars)) - self.assertRegexpMatches(progress_bars[0], ".*\\[#{7} {23}\\] 25%.*") - self.assertRegexpMatches(progress_bars[1], ".*\\[#{15} {15}\\] 50%.*") - self.assertRegexpMatches(progress_bars[2], ".*\\[#{22} {8}\\] 75%.*") - self.assertRegexpMatches(progress_bars[3], ".*\\[#{30}\\] 100%.*") + assert re.search(".*\\[#{7} {23}\\] 25%.*", progress_bars[0]) + assert re.search(".*\\[#{15} {15}\\] 50%.*", progress_bars[1]) + assert re.search(".*\\[#{22} {8}\\] 75%.*", progress_bars[2]) + assert re.search(".*\\[#{30}\\] 100%.*", progress_bars[3]) self.assertCaretReturnFollowsEach(update_bars) self.assertNewLineFollows(finish_bar) diff --git a/tests/unit/test_logger.py b/tests/unit/test_logger.py index 889fb4d0c..12272c92f 100644 --- a/tests/unit/test_logger.py +++ b/tests/unit/test_logger.py @@ -150,10 +150,10 @@ class TestColorFormatter: assert expected == formatter.format(caplog.records[0]) - def test_progress_awareness(self, mock, capsys, caplog): + def test_progress_awareness(self, mocker, capsys, caplog): from dvc.progress import progress - with mock.patch("sys.stdout.isatty", return_value=True): + with mocker.patch("sys.stdout.isatty", return_value=True): progress.set_n_total(100) progress.update_target("progress", 1, 10)