tests: use pytest caplog instead of custom mock

Close #1753
This commit is contained in:
Mr. Outis
2019-04-06 20:35:30 -06:00
parent 85cd344152
commit 921b39dbfe
19 changed files with 417 additions and 581 deletions
+5 -3
View File
@@ -2,15 +2,17 @@ from __future__ import unicode_literals
import humanize
import inflect
import logging
import dvc.logger as logger
from dvc.exceptions import DvcException
from dvc.command.base import CmdBase
from dvc.utils.collections import compact
import dvc.repo.diff as diff
logger = logging.getLogger(__name__)
class CmdDiff(CmdBase):
def _print_size(self, size):
if size < 0:
@@ -113,7 +115,7 @@ class CmdDiff(CmdBase):
compact([self.args.target, self.args.a_ref, self.args.b_ref])
)
msg = msg.format(args)
logger.error(msg)
logger.exception(msg)
return 1
return 0