(mock)
| 952 | self.assertRaises(TypeError, mock) |
| 953 | |
| 954 | def _test2(mock): |
| 955 | mock.f(1) |
| 956 | mock.f.assert_called_with(1) |
| 957 | self.assertRaises(TypeError, mock.f) |
| 958 | |
| 959 | mock.g() |
| 960 | mock.g.assert_called_with() |
| 961 | self.assertRaises(TypeError, mock.g, 1) |
| 962 | |
| 963 | self.assertRaises(AttributeError, getattr, mock, 'h') |
| 964 | |
| 965 | mock.foo.lower() |
| 966 | mock.foo.lower.assert_called_with() |
| 967 | self.assertRaises(AttributeError, getattr, mock.foo, 'bar') |
| 968 | |
| 969 | mock.Bar() |
| 970 | mock.Bar.assert_called_with() |
| 971 | |
| 972 | mock.Bar.a() |
| 973 | mock.Bar.a.assert_called_with() |
| 974 | self.assertRaises(TypeError, mock.Bar.a, 1) |
| 975 | |
| 976 | mock.Bar().a() |
| 977 | mock.Bar().a.assert_called_with() |
| 978 | self.assertRaises(TypeError, mock.Bar().a, 1) |
| 979 | |
| 980 | self.assertRaises(AttributeError, getattr, mock.Bar, 'b') |
| 981 | self.assertRaises(AttributeError, getattr, mock.Bar(), 'b') |
| 982 | |
| 983 | def function(mock): |
| 984 | _test(mock) |
nothing calls this directly
no test coverage detected