-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'piccolo-orm:master' into reverse_lookup
- Loading branch information
Showing
3 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
coveralls==3.3.1 | ||
httpx==0.27.2 | ||
httpx==0.28.0 | ||
pytest-cov==3.0.0 | ||
pytest==6.2.5 | ||
python-dateutil==2.8.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from piccolo.columns.column_types import Integer | ||
from piccolo.table import Table | ||
from piccolo.testing.test_case import AsyncTableTest | ||
from tests.base import sqlite_only | ||
|
||
|
||
class MyTable(Table): | ||
integer = Integer() | ||
|
||
|
||
@sqlite_only | ||
class TestInteger(AsyncTableTest): | ||
tables = [MyTable] | ||
|
||
async def test_large_integer(self): | ||
""" | ||
Make sure large integers can be inserted and retrieved correctly. | ||
There was a bug with this in SQLite: | ||
https://github.com/piccolo-orm/piccolo/issues/1127 | ||
""" | ||
integer = 625757527765811240 | ||
|
||
row = MyTable(integer=integer) | ||
await row.save() | ||
|
||
_row = MyTable.objects().first().run_sync() | ||
assert _row is not None | ||
|
||
self.assertEqual(_row.integer, integer) |