Skip to content

Commit 722f4a4

Browse files
committed
skip new tests for 2.7
1 parent 133864b commit 722f4a4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/llsd_test.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,6 +1977,7 @@ def test_uuid_map_key(self):
19771977
self.assertEqual(llsd.format_notation(llsdmap), b"{'00000000-0000-0000-0000-000000000000':'uuid'}")
19781978

19791979

1980+
@unittest.skipIf(PY2, "These tests require Python 3")
19801981
class InvalidInputTypes(unittest.TestCase):
19811982
'''
19821983
Tests for handling invalid input types that should raise LLSDParseError
@@ -1990,16 +1991,12 @@ def test_parse_magicmock_raises_error(self):
19901991
an infinite loop when passed a MagicMock (e.g., from an improperly
19911992
mocked requests.Response.content).
19921993
'''
1993-
try:
1994-
from unittest.mock import MagicMock
1995-
except ImportError:
1996-
from mock import MagicMock # Python 2.7
1994+
from unittest.mock import MagicMock
19971995
mock = MagicMock()
19981996
with self.assertRaises(llsd.LLSDParseError) as context:
19991997
llsd.parse(mock)
20001998
self.assertIn('MagicMock', str(context.exception))
20011999

2002-
@unittest.skipIf(PY2, "str is bytes in Python 2")
20032000
def test_parse_string_raises_error(self):
20042001
'''
20052002
Parsing a string (not bytes) should raise LLSDParseError.

0 commit comments

Comments
 (0)