Skip to content

Commit 7f7a96b

Browse files
committed
Updated test so assert does not happen before error is thrown
1 parent 30e7d87 commit 7f7a96b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/nuodb_basic_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,12 @@ def test_param_date_error(self):
791791
cursor.execute("create table typetest (id integer GENERATED ALWAYS AS IDENTITY, date_col date)")
792792

793793
test_vals = (pynuodb.Date(1800, 1, 1),)
794-
795-
with self.assertRaises(pynuodb.DataError):
794+
try:
796795
cursor.execute("insert into typetest (date_col) values (?)", test_vals)
797-
796+
except pynuodb.DataError:
797+
pass
798+
except:
799+
self.fail()
798800

799801
if __name__ == '__main__':
800802
unittest.main()

0 commit comments

Comments
 (0)