Skip to content

Commit

Permalink
Skip a test that fails on pypy3
Browse files Browse the repository at this point in the history
  • Loading branch information
Xion committed Mar 29, 2016
1 parent a48321c commit bf2e4ad
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/test_general.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
"""
Tests for general matchers.
"""
import platform

from taipan.testing import skipIf, skipUnless

from callee._compat import IS_PY3
import callee.general as __unit__
from tests import MatcherTestCase


IS_PYPY3 = IS_PY3 and platform.python_implementation() == 'PyPy'


class Any(MatcherTestCase):
test_none = lambda self: self.assert_match(None)
test_zero = lambda self: self.assert_match(0)
Expand Down Expand Up @@ -121,7 +129,15 @@ def func():
pass
self.assert_match(func)

test_method = lambda self: self.assert_no_match(str.upper)
@skipIf(IS_PYPY3, "requires non-PyPy3 interpreter")
def test_method__non_pypy3(self):
self.assert_no_match(str.upper)
# TODO: accept unbound methods as functions

@skipUnless(IS_PYPY3, "requires PyPy3")
def test_method__pypy3(self):
self.assert_match(str.upper)

test_type = lambda self: self.assert_no_match(object)

def test_callable_object(self):
Expand Down

0 comments on commit bf2e4ad

Please sign in to comment.