tests: resolve deprecation warnings (#2028)

* tests: resolve deprecation warnings

Fixes #2021

* tests: resolve deprecation warnings

Fixes #2021
This commit is contained in:
Tadas Audinis
2019-05-24 03:12:36 +03:00
committed by Ruslan Kuprieiev
parent 037f32c8cc
commit ee6a0b2875
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -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)
+2 -2
View File
@@ -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)