mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 15:28:28 +01:00
+10
-2
@@ -6,17 +6,21 @@ import os
|
||||
import shutil
|
||||
import uuid
|
||||
import tempfile
|
||||
import logging
|
||||
|
||||
from git import Repo
|
||||
from git.exc import GitCommandNotFound
|
||||
from unittest import TestCase
|
||||
import pytest
|
||||
|
||||
import dvc.logger as logger
|
||||
from dvc.command.remote import CmdRemoteAdd
|
||||
from dvc.repo import Repo as DvcRepo
|
||||
from dvc.utils.compat import open, str
|
||||
|
||||
|
||||
logger = logging.getLogger("dvc")
|
||||
|
||||
|
||||
class TestDirFixture(object):
|
||||
GCP_CREDS_FILE = os.path.abspath(
|
||||
os.path.join("scripts", "ci", "gcp-creds.json")
|
||||
@@ -139,7 +143,7 @@ class TestDvcFixture(TestGitFixture):
|
||||
super(TestDvcFixture, self).setUp()
|
||||
self.dvc = DvcRepo.init(self._root_dir)
|
||||
self.dvc.scm.commit("init dvc")
|
||||
logger.be_verbose()
|
||||
logger.setLevel("DEBUG")
|
||||
|
||||
|
||||
class TestDvcGitInitializedFixture(TestDvcFixture):
|
||||
@@ -219,6 +223,10 @@ class TestDvc(TestDvcFixture, TestCase):
|
||||
TestDvcFixture.__init__(self, root_dir)
|
||||
TestCase.__init__(self, methodName)
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def inject_fixtures(self, caplog):
|
||||
self._caplog = caplog
|
||||
|
||||
|
||||
class TestDvcPkg(TestDvcFixture, TestCase):
|
||||
GIT_PKG = "git_pkg"
|
||||
|
||||
Reference in New Issue
Block a user