From 6474725d4f783e192b20f889f1e46e896ab7de03 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 20 Feb 2020 03:45:28 +0200 Subject: [PATCH] test: repro: prevent dvc.stages resetting (#3368) --- tests/func/test_repro.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/func/test_repro.py b/tests/func/test_repro.py index c9beb777bb..99eb24d345 100644 --- a/tests/func/test_repro.py +++ b/tests/func/test_repro.py @@ -175,8 +175,9 @@ def test_nested(self): Stage.load(self.dvc, error_stage_path), ] - with self.assertRaises(StagePathAsOutputError): - self.dvc.reproduce(error_stage_path) + with patch.object(self.dvc, "_reset"): # to prevent `stages` resetting + with self.assertRaises(StagePathAsOutputError): + self.dvc.reproduce(error_stage_path) def test_similar_paths(self): # File structure: