@@ -36,15 +36,15 @@ def test_too_few_expected_raises_and_first_line_in_error(self):
3636 with self .assertRaises (XCTestCheckerError ) as cm :
3737 compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
3838
39- self .assertIn ('{}:{}' .format (expected , 1 ), cm .exception . message )
39+ self .assertIn ('{}:{}' .format (expected , 1 ), str ( cm .exception ) )
4040
4141 def test_too_many_expected_raises_and_excess_check_line_in_error (self ):
4242 actual = _tmpfile ('foo\n bar\n ' )
4343 expected = _tmpfile ('c: foo\n c: bar\n c: baz\n ' )
4444 with self .assertRaises (XCTestCheckerError ) as cm :
4545 compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
4646
47- self .assertIn ('{}:{}' .format (expected , 3 ), cm .exception . message )
47+ self .assertIn ('{}:{}' .format (expected , 3 ), str ( cm .exception ) )
4848
4949 def test_match_does_not_raise (self ):
5050 actual = _tmpfile ('foo\n bar\n baz\n ' )
@@ -62,7 +62,7 @@ def test_check_prefix_twice_in_the_same_line_raises_with_line(self):
6262 with self .assertRaises (XCTestCheckerError ) as cm :
6363 compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
6464
65- self .assertIn ('{}:{}' .format (expected , 2 ), cm .exception . message )
65+ self .assertIn ('{}:{}' .format (expected , 2 ), str ( cm .exception ) )
6666
6767 def test_check_prefix_in_run_line_ignored (self ):
6868 actual = _tmpfile ('flim\n ' )
@@ -75,7 +75,7 @@ def test_includes_file_name_and_line_of_expected_in_error(self):
7575 with self .assertRaises (XCTestCheckerError ) as cm :
7676 compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
7777
78- self .assertIn ("{}:{}:" .format (expected , 2 ), cm .exception . message )
78+ self .assertIn ("{}:{}:" .format (expected , 2 ), str ( cm .exception ) )
7979
8080 def test_matching_ignores_leading_and_trailing_whitespace (self ):
8181 actual = _tmpfile ('foo\n bar\n baz\n ' )
0 commit comments