mirror of
https://github.com/enpaul/peewee-plus.git
synced 2024-12-26 01:33:31 +00:00
Clean up the tests
Add tests for __all__ public api definition Rename test modules for consistency
This commit is contained in:
parent
0d1c642871
commit
480e3f3875
@ -8,6 +8,15 @@ import peewee_plus
|
|||||||
from .fixtures import fakedb
|
from .fixtures import fakedb
|
||||||
|
|
||||||
|
|
||||||
|
def test_public_api():
|
||||||
|
"""Test that the public API components are exposed via ``__all__``"""
|
||||||
|
|
||||||
|
assert peewee_plus.calc_batch_size.__name__ in peewee_plus.__all__
|
||||||
|
assert peewee_plus.flat_transaction.__name__ in peewee_plus.__all__
|
||||||
|
assert "SQLITE_DEFAULT_VARIABLE_LIMIT" in peewee_plus.__all__
|
||||||
|
assert "SQLITE_DEFAULT_PRAGMAS" in peewee_plus.__all__
|
||||||
|
|
||||||
|
|
||||||
def test_sqlite(fakedb):
|
def test_sqlite(fakedb):
|
||||||
"""Test the calculation of batch sizes on SQLite"""
|
"""Test the calculation of batch sizes on SQLite"""
|
||||||
|
|
||||||
|
@ -11,6 +11,12 @@ import peewee_plus
|
|||||||
from .fixtures import fakedb
|
from .fixtures import fakedb
|
||||||
|
|
||||||
|
|
||||||
|
def test_public_api():
|
||||||
|
"""Test that the public API components are exposed via ``__all__``"""
|
||||||
|
|
||||||
|
assert peewee_plus.EnumField.__name__ in peewee_plus.__all__
|
||||||
|
|
||||||
|
|
||||||
def test_enum(fakedb):
|
def test_enum(fakedb):
|
||||||
"""Test basic functionality of the enum field"""
|
"""Test basic functionality of the enum field"""
|
||||||
|
|
@ -11,6 +11,12 @@ import peewee_plus
|
|||||||
from .fixtures import fakedb
|
from .fixtures import fakedb
|
||||||
|
|
||||||
|
|
||||||
|
def test_public_api():
|
||||||
|
"""Test that the public API components are exposed via ``__all__``"""
|
||||||
|
|
||||||
|
assert peewee_plus.JSONField.__name__ in peewee_plus.__all__
|
||||||
|
|
||||||
|
|
||||||
def test_json(fakedb):
|
def test_json(fakedb):
|
||||||
"""Test basic usage of JSONField class"""
|
"""Test basic usage of JSONField class"""
|
||||||
|
|
@ -10,6 +10,12 @@ import peewee_plus
|
|||||||
from .fixtures import fakedb
|
from .fixtures import fakedb
|
||||||
|
|
||||||
|
|
||||||
|
def test_public_api():
|
||||||
|
"""Test that the public API components are exposed via ``__all__``"""
|
||||||
|
|
||||||
|
assert peewee_plus.PathField.__name__ in peewee_plus.__all__
|
||||||
|
|
||||||
|
|
||||||
def test_conversion(fakedb):
|
def test_conversion(fakedb):
|
||||||
"""Test basic usage of PathField for roundtrip compatibility"""
|
"""Test basic usage of PathField for roundtrip compatibility"""
|
||||||
|
|
@ -8,6 +8,12 @@ import peewee_plus
|
|||||||
from .fixtures import fakedb
|
from .fixtures import fakedb
|
||||||
|
|
||||||
|
|
||||||
|
def test_public_api():
|
||||||
|
"""Test that the public API components are exposed via ``__all__``"""
|
||||||
|
|
||||||
|
assert peewee_plus.PrecisionFloatField.__name__ in peewee_plus.__all__
|
||||||
|
|
||||||
|
|
||||||
# There isn't anything we can really test here since this field implements
|
# There isn't anything we can really test here since this field implements
|
||||||
# a MySQL-specific syntax and we test with SQLite. This test is here just
|
# a MySQL-specific syntax and we test with SQLite. This test is here just
|
||||||
# to ensure that the behavior is consistent with the normal FloatField when
|
# to ensure that the behavior is consistent with the normal FloatField when
|
||||||
|
@ -11,6 +11,12 @@ import peewee_plus
|
|||||||
from .fixtures import fakedb
|
from .fixtures import fakedb
|
||||||
|
|
||||||
|
|
||||||
|
def test_public_api():
|
||||||
|
"""Test that the public API components are exposed via ``__all__``"""
|
||||||
|
|
||||||
|
assert peewee_plus.TimedeltaField.__name__ in peewee_plus.__all__
|
||||||
|
|
||||||
|
|
||||||
def test_conversion(fakedb):
|
def test_conversion(fakedb):
|
||||||
"""Test basic usage of PathField for roundtrip compatibility"""
|
"""Test basic usage of PathField for roundtrip compatibility"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user