use less hacks in yaml tests

This commit is contained in:
Maciej Fijalkowski 2020-08-06 16:06:01 +02:00
parent 57fdd9f6b4
commit b71ae461a6

View File

@ -554,7 +554,6 @@ class YAML(unittest.TestCase):
def test_convert(self):
data = yaml.safe_dump(["str", u"unicode", u"\u1234nicode"])
back = yamlutil.safe_load(data)
str_type = type("x") # workaround for future.builtins.str
self.failUnlessEqual(type(back[0]), str_type)
self.failUnlessEqual(type(back[1]), str_type)
self.failUnlessEqual(type(back[2]), str_type)
self.assertIsInstance(back[0], str)
self.assertIsInstance(back[1], str)
self.assertIsInstance(back[2], str)