Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqltests #25

Merged
merged 11 commits into from
May 27, 2017
6 changes: 3 additions & 3 deletions tests/sqltests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import unittest
from cs50.sql import SQL
import warnings

class SQLTests(unittest.TestCase):
def test_delete_returns_affected_rows(self):
@@ -86,10 +87,9 @@ def tearDown(self):
def tearDownClass(self):
try:
self.db.execute("DROP TABLE IF EXISTS cs50")
except RuntimeError as e:

except Warning as e:
# suppress "unknown table"
if not str(e).startswith("(1051L"):
if not str(e).startswith("(1051"):
raise e

class PostgresTests(SQLTests):