diff --git a/tests/python/pants_test/util/test_objects.py b/tests/python/pants_test/util/test_objects.py index c30c776caa15..1fee377ef1bf 100644 --- a/tests/python/pants_test/util/test_objects.py +++ b/tests/python/pants_test/util/test_objects.py @@ -558,7 +558,7 @@ def test_instance_construction_errors(self): SomeTypedDatatype() expected_msg = """\ error: in constructor of type SomeTypedDatatype: type check error: -missing arguments: [u'val']""" +missing arguments: [{}'val']""".format('u' if PY2 else '') self.assertEqual(str(cm.exception), expected_msg) # unrecognized fields @@ -568,7 +568,7 @@ def test_instance_construction_errors(self): error: in constructor of type SomeTypedDatatype: type check error: too many positional arguments: 2 arguments for 1 fields! args: (3, 4) -fields: [u'val']""" +fields: [{}'val']""".format('u' if PY2 else '') self.assertEqual(str(cm.exception), expected_msg) with self.assertRaises(TypedDatatypeInstanceConstructionError) as cm: