@@ -87,7 +87,7 @@ def test_assert_true__truthy_value(self):
8787 assert_true ("Hello World!" )
8888
8989 def test_assert_true__falsy_value__default_message (self ):
90- with _assert_raises_assertion ("'' is not true " ):
90+ with _assert_raises_assertion ("'' is not truthy " ):
9191 assert_true ("" )
9292
9393 def test_assert_true__falsy_value__custom_message (self ):
@@ -98,7 +98,7 @@ def test_assert_false__falsy_value(self):
9898 assert_false ("" )
9999
100100 def test_assert_false__truthy_value__default_message (self ):
101- with _assert_raises_assertion ("25 is not false " ):
101+ with _assert_raises_assertion ("25 is not falsy " ):
102102 assert_false (25 )
103103
104104 def test_assert_false__truthy_value__custom_message (self ):
@@ -113,15 +113,15 @@ def test_assert_boolean_true__false__custom_message(self):
113113 assert_boolean_true (False , msg = "test message" )
114114
115115 def test_assert_boolean_true__truthy__default_message (self ):
116- with _assert_raises_assertion ("True is not 1 " ):
116+ with _assert_raises_assertion ("1 is not True " ):
117117 assert_boolean_true (1 )
118118
119119 def test_assert_boolean_false__false (self ):
120120 assert_boolean_false (False )
121121
122122 def test_assert_boolean_false__true__default_message (self ):
123- with _assert_raises_assertion ("False is not True " ):
124- assert_boolean_false (True )
123+ with _assert_raises_assertion ("'foo' is not False " ):
124+ assert_boolean_false ("foo" )
125125
126126 def test_assert_boolean_false__falsy__custom_message (self ):
127127 with _assert_raises_assertion ("test message" ):
@@ -142,7 +142,7 @@ def test_assert_is_not_none__string(self):
142142 assert_is_not_none ("" )
143143
144144 def test_assert_is_not_none__none__default_message (self ):
145- with _assert_raises_assertion ("None is None" ):
145+ with _assert_raises_assertion ("expected value not to be None" ):
146146 assert_is_not_none (None )
147147
148148 def test_assert_is_not_none__none__custom_message (self ):
@@ -234,7 +234,7 @@ def test_assert_regex__does_not_match_string__default_message(self):
234234 assert_regex ("This is a test text" , "XXX" )
235235
236236 def test_assert_regex__does_not_match_regex__default_message (self ):
237- regex = re .compile ("XXX" )
237+ regex = re .compile (r "XXX" )
238238 with _assert_raises_assertion (
239239 "'This is a test text' does not match 'XXX'" ):
240240 assert_regex ("This is a test text" , regex )
@@ -263,7 +263,7 @@ def test_assert_is_not__not_same(self):
263263 assert_is_not (x , y )
264264
265265 def test_assert_is_not__same__default_message (self ):
266- with _assert_raises_assertion ("5 is 5" ):
266+ with _assert_raises_assertion ("expected value not to be 5" ):
267267 assert_is_not (5 , 5 )
268268
269269 def test_assert_is_not__same__custom_message (self ):
@@ -313,8 +313,8 @@ def test_assert_is_instance__is_sub_class(self):
313313 assert_is_instance (IOError (), Exception )
314314
315315 def test_assert_is_instance__not_instance__default_message (self ):
316- expected_message = ("'my string' is of <class 'str'> "
317- "not of <class 'int'>" )
316+ expected_message = ("'my string' is of <class 'str'>, "
317+ "expected <class 'int'>" )
318318 if sys .version_info [0 ] < 3 :
319319 expected_message = expected_message .replace ("class" , "type" )
320320 with _assert_raises_assertion (expected_message ):
@@ -452,7 +452,7 @@ class WrongClass(OSError):
452452 raise AssertionError ("WrongClass was not raised" )
453453
454454 def test_assert_raises_errno__wrong_errno__default_message (self ):
455- with _assert_raises_assertion ("20 != 1" ):
455+ with _assert_raises_assertion ("wrong errno: 20 != 1" ):
456456 with assert_raises_errno (OSError , 20 ):
457457 raise OSError (1 , "Test error" )
458458
0 commit comments