Skip to content

Commit

Permalink
Merge pull request #3 from chineking/bugfix/catch-mock-importerror
Browse files Browse the repository at this point in the history
try catch ImportError if mock not installed(#2)
  • Loading branch information
wjsi committed Dec 7, 2018
2 parents 33f7ca9 + 08a51ae commit e8680cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mars/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ def east_asian_len(data, encoding=None, ambiguous_width=1):
def total_seconds(self):
return self.days * 86400.0 + self.seconds + self.microseconds * 1.0e-6
else:
import unittest
import mock
try:
import unittest
import mock
except ImportError:
pass

from collections import OrderedDict

dictconfig = lambda config: logging.config.dictConfig(config)
Expand Down

0 comments on commit e8680cd

Please sign in to comment.