def test_unescape_with_escape(self): """Tests that Name.unescape for escaped string returns the correct string""" s = 'hello, "world"; insert <token + value>' self.assertEqual( s, Name.unescape(Name.escape(s)))
def test_unescape_no_escape(self): """Tests that Name.unescape for unescaped string returns the input string""" s = 'hello world' expected = s self.assertEqual(expected, Name.unescape(s))
def test_unescape_no_escape(self): """Tests that Name.unescape for unescaped string returns the input string""" s = 'hello world' expected = s self.assertEqual( expected, Name.unescape(s))
def Name_unescape2(): """Tests that Name.unescape for escaped string with invalid escape seqienmce raises ValueError""" with assert_exception(ValueError): Name.unescape('#01')
def Name_unescape1(): """Tests that Name.unescape for escaped string returns the correct string""" s = 'hello, "world"; insert <token + value>' assert_eq(s, Name.unescape(Name.escape(s)))
def Name_unescape0(): """Tests that Name.unescape for unescaped string returns the input string""" s = 'hello world' expected = s assert_eq(expected, Name.unescape(s))
def test_unescape_invalid_escape(self): """Tests that Name.unescape for escaped string with invalid escape seqienmce raises ValueError""" with self.assertRaises(ValueError): Name.unescape('#01')
def test_unescape_with_escape(self): """Tests that Name.unescape for escaped string returns the correct string""" s = 'hello, "world"; insert <token + value>' self.assertEqual(s, Name.unescape(Name.escape(s)))