Skip to content

Commit

Permalink
py3 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jan 20, 2019
1 parent 18a6306 commit 8adbcc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/python/pants_test/util/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 8adbcc3

Please sign in to comment.