mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 07:18:31 +01:00
dvc: modify flake8 configuration
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -11,7 +11,6 @@ import filecmp
|
||||
from mock import patch
|
||||
|
||||
from dvc.main import main
|
||||
from dvc.state import State
|
||||
from dvc.utils import file_md5
|
||||
from dvc.stage import Stage
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
@@ -381,7 +381,10 @@ class TestCheckoutSuggestGit(TestRepro):
|
||||
msg = str(exc)
|
||||
self.assertEqual(
|
||||
msg,
|
||||
"'gitbranch' does not exist. Did you mean 'git checkout gitbranch'?",
|
||||
(
|
||||
"'gitbranch' does not exist. "
|
||||
"Did you mean 'git checkout gitbranch'?"
|
||||
),
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import yaml
|
||||
import shutil
|
||||
|
||||
from tests.basic_env import TestDvc
|
||||
from dvc.stage import StageCommitError
|
||||
|
||||
@@ -363,8 +363,9 @@ class TestMetricsCLI(TestMetrics):
|
||||
ret = main(["metrics", "add", "metric.unknown", "-t", "unknown"])
|
||||
self.assertEqual(ret, 1)
|
||||
self.assertIn(
|
||||
"failed to add metric file 'metric.unknown' - metric type 'unknown'"
|
||||
" is not supported, must be one of [raw, json, csv, tsv, hcsv, htsv]",
|
||||
"failed to add metric file 'metric.unknown' - metric type "
|
||||
"'unknown' is not supported, must be one of "
|
||||
"[raw, json, csv, tsv, hcsv, htsv]",
|
||||
logger.logger.handlers[1].stream.getvalue(),
|
||||
)
|
||||
|
||||
@@ -394,8 +395,9 @@ class TestMetricsCLI(TestMetrics):
|
||||
)
|
||||
self.assertEqual(ret, 1)
|
||||
self.assertIn(
|
||||
"failed to modify metric file settings - metric type 'unknown'"
|
||||
" is not supported, must be one of [raw, json, csv, tsv, hcsv, htsv]",
|
||||
"failed to modify metric file settings - metric type "
|
||||
"'unknown' is not supported, must be one of "
|
||||
"[raw, json, csv, tsv, hcsv, htsv]",
|
||||
logger.logger.handlers[1].stream.getvalue(),
|
||||
)
|
||||
|
||||
|
||||
+14
-11
@@ -803,13 +803,15 @@ class TestReproExternalBase(TestDvc):
|
||||
|
||||
patch_run = patch.object(stage, "_run", wraps=stage._run)
|
||||
|
||||
with self.dvc.state, patch_download as mock_download, patch_checkout as mock_checkout, patch_run as mock_run:
|
||||
with self.dvc.state:
|
||||
with patch_download as mock_download:
|
||||
with patch_checkout as mock_checkout:
|
||||
with patch_run as mock_run:
|
||||
stage.run()
|
||||
|
||||
stage.run()
|
||||
|
||||
mock_run.assert_not_called()
|
||||
mock_download.assert_not_called()
|
||||
mock_checkout.assert_called_once()
|
||||
mock_run.assert_not_called()
|
||||
mock_download.assert_not_called()
|
||||
mock_checkout.assert_called_once()
|
||||
|
||||
def corrupted_cache(self):
|
||||
os.unlink("bar.dvc")
|
||||
@@ -827,12 +829,13 @@ class TestReproExternalBase(TestDvc):
|
||||
|
||||
patch_run = patch.object(stage, "_run", wraps=stage._run)
|
||||
|
||||
with self.dvc.state, patch_checkout as mock_checkout, patch_run as mock_run:
|
||||
with self.dvc.state:
|
||||
with patch_checkout as mock_checkout:
|
||||
with patch_run as mock_run:
|
||||
stage.run()
|
||||
|
||||
stage.run()
|
||||
|
||||
mock_run.assert_called_once()
|
||||
mock_checkout.assert_not_called()
|
||||
mock_run.assert_called_once()
|
||||
mock_checkout.assert_not_called()
|
||||
|
||||
@patch("dvc.prompt.confirm", return_value=True)
|
||||
def test(self, mock_prompt):
|
||||
|
||||
@@ -13,7 +13,9 @@ class TestRemoteAzure(TestCase):
|
||||
)
|
||||
|
||||
def test_init_compat(self):
|
||||
url = "azure://ContainerName={container_name};{connection_string}".format(
|
||||
url = (
|
||||
"azure://ContainerName={container_name};{connection_string}"
|
||||
).format(
|
||||
container_name=self.container_name,
|
||||
connection_string=self.connection_string,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user