Commit 359653a
Fix for TypeError in python 3.7 (#113)
pytest with throw this error when running in version 3.7:
"TypeError: catching classes that do not inherit from BaseException is not allowed"
Changing the inheritance from object to Exception will fix this and is compatible back to version 2.7 and should cause no issues.
This pytest sample test that will trigger the error in python 3.7:
def test_init_with_bad_url(self):
with pytest.raises(validators.ValidationFailure):
assert True1 parent fc0eeae commit 359653a
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments