@@ -36,15 +36,15 @@ def test_too_few_expected_raises_and_first_line_in_error(self):
36
36
with self .assertRaises (XCTestCheckerError ) as cm :
37
37
compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
38
38
39
- self .assertIn ('{}:{}' .format (expected , 1 ), cm .exception . message )
39
+ self .assertIn ('{}:{}' .format (expected , 1 ), str ( cm .exception ) )
40
40
41
41
def test_too_many_expected_raises_and_excess_check_line_in_error (self ):
42
42
actual = _tmpfile ('foo\n bar\n ' )
43
43
expected = _tmpfile ('c: foo\n c: bar\n c: baz\n ' )
44
44
with self .assertRaises (XCTestCheckerError ) as cm :
45
45
compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
46
46
47
- self .assertIn ('{}:{}' .format (expected , 3 ), cm .exception . message )
47
+ self .assertIn ('{}:{}' .format (expected , 3 ), str ( cm .exception ) )
48
48
49
49
def test_match_does_not_raise (self ):
50
50
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):
62
62
with self .assertRaises (XCTestCheckerError ) as cm :
63
63
compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
64
64
65
- self .assertIn ('{}:{}' .format (expected , 2 ), cm .exception . message )
65
+ self .assertIn ('{}:{}' .format (expected , 2 ), str ( cm .exception ) )
66
66
67
67
def test_check_prefix_in_run_line_ignored (self ):
68
68
actual = _tmpfile ('flim\n ' )
@@ -75,7 +75,7 @@ def test_includes_file_name_and_line_of_expected_in_error(self):
75
75
with self .assertRaises (XCTestCheckerError ) as cm :
76
76
compare .compare (open (actual , 'r' ), expected , check_prefix = 'c: ' )
77
77
78
- self .assertIn ("{}:{}:" .format (expected , 2 ), cm .exception . message )
78
+ self .assertIn ("{}:{}:" .format (expected , 2 ), str ( cm .exception ) )
79
79
80
80
def test_matching_ignores_leading_and_trailing_whitespace (self ):
81
81
actual = _tmpfile ('foo\n bar\n baz\n ' )
0 commit comments