We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bc77ab commit a45a3ecCopy full SHA for a45a3ec
1 file changed
tests/sqltests.py
@@ -1,6 +1,7 @@
1
import sys
2
import unittest
3
from cs50.sql import SQL
4
+import warnings
5
6
class SQLTests(unittest.TestCase):
7
def test_delete_returns_affected_rows(self):
@@ -86,10 +87,9 @@ def tearDown(self):
86
87
def tearDownClass(self):
88
try:
89
self.db.execute("DROP TABLE IF EXISTS cs50")
- except RuntimeError as e:
90
-
+ except Warning as e:
91
# suppress "unknown table"
92
- if not str(e).startswith("(1051L"):
+ if not str(e).startswith("(1051"):
93
raise e
94
95
class PostgresTests(SQLTests):
0 commit comments