コード例 #1
0
 def test_string_fail(self):
     with raises(AssertionError) as exc:
         types.string(1)
     assert exc.value.args[0] == 'not of type string'
コード例 #2
0
 def test_string_pass(self):
     assert types.string('a string') is None