Skip to content

Commit

Permalink
Move compatibility imports used in tests to separate file
Browse files Browse the repository at this point in the history
Fixes issue Stranger6667#158.
  • Loading branch information
suriya committed Aug 31, 2018
1 parent c0c0f7a commit 91fa562
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 0 additions & 6 deletions postmarker/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
from urlparse import urljoin # noqa


try:
from unittest.mock import patch
except ImportError: # Python < 3.3
from mock import patch # noqa


try:
from inspect import signature

Expand Down
7 changes: 7 additions & 0 deletions postmarker/_compat_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# coding: utf-8


try:
from unittest.mock import patch
except ImportError: # Python < 3.3
from mock import patch # noqa
2 changes: 1 addition & 1 deletion postmarker/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from ._compat import patch
from ._compat_tests import patch
from .core import PostmarkClient, requests


Expand Down

0 comments on commit 91fa562

Please sign in to comment.