File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff 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" )
19801981class 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.
You can’t perform that action at this time.
0 commit comments