Skip to content

Commit

Permalink
test_memcache.py: try import unittest.mock
Browse files Browse the repository at this point in the history
Rather than always require the separate mock module,
try to use unittest.mock if it is available

Signed-off-by: Tim Orling <[email protected]>
  • Loading branch information
moto-timo committed Dec 16, 2019
1 parent bad4122 commit 44c5317
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import unittest
import zlib

import mock
try:
import unittest.mock as mock
except ImportError:
import mock

from memcache import Client, _Host, SERVER_MAX_KEY_LENGTH, SERVER_MAX_VALUE_LENGTH # noqa: H301
from .utils import captured_stderr
Expand Down

0 comments on commit 44c5317

Please sign in to comment.