Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Move test_sqlite3.py to extra_tests/
Browse files Browse the repository at this point in the history
  • Loading branch information
rlamy committed Nov 29, 2018
1 parent ef10776 commit 67450df
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,17 @@ def cast(obj):
def test_null_character(con):
if not hasattr(_sqlite3, '_ffi') and sys.version_info < (2, 7, 9):
pytest.skip("_sqlite3 too old")
with raises(ValueError) as excinfo:
with pytest.raises(ValueError) as excinfo:
con("\0select 1")
assert str(excinfo.value) == "the query contains a null character"
with raises(ValueError) as excinfo:
with pytest.raises(ValueError) as excinfo:
con("select 1\0")
assert str(excinfo.value) == "the query contains a null character"
cur = con.cursor()
with raises(ValueError) as excinfo:
with pytest.raises(ValueError) as excinfo:
cur.execute("\0select 2")
assert str(excinfo.value) == "the query contains a null character"
with raises(ValueError) as excinfo:
with pytest.raises(ValueError) as excinfo:
cur.execute("select 2\0")
assert str(excinfo.value) == "the query contains a null character"

Expand Down

0 comments on commit 67450df

Please sign in to comment.