diff --git a/test/test_frozendict.py b/test/test_frozendict.py index 7eb3941..d7bd3c8 100644 --- a/test/test_frozendict.py +++ b/test/test_frozendict.py @@ -1,4 +1,3 @@ -from frozendict.core import frozendict as FrozendictPyClass from .common import FrozendictCommonTest from .frozendict_only import FrozendictOnlyTest import frozendict as cool @@ -7,14 +6,7 @@ is_subclass = False - -class TestPyFrozendict(FrozendictCommonTest, FrozendictOnlyTest): - FrozendictClass = FrozendictPyClass - c_ext = False +class TestFrozendict(FrozendictCommonTest, FrozendictOnlyTest): + FrozendictClass = FrozendictClass + c_ext = cool.c_ext is_subclass = is_subclass - -if cool.c_ext: - class TestCFrozendict(FrozendictCommonTest, FrozendictOnlyTest): - FrozendictClass = FrozendictClass - c_ext = cool.c_ext - is_subclass = is_subclass diff --git a/test/test_frozendict_subclass.py b/test/test_frozendict_subclass.py index 1075ce4..bf2620e 100644 --- a/test/test_frozendict_subclass.py +++ b/test/test_frozendict_subclass.py @@ -1,4 +1,3 @@ -from frozendict.core import frozendict as FrozendictPyClass from .common import FrozendictCommonTest from .subclass_only import FrozendictSubclassOnlyTest import frozendict as cool @@ -8,12 +7,12 @@ is_subclass = True -class FrozendictPySubclass(FrozendictPyClass): +class FrozendictSubclass(FrozendictClass): def __new__(cls, *args, **kwargs): return super().__new__(cls, *args, **kwargs) -class FrozendictPyMissingSubclass(FrozendictPyClass): +class FrozendictMissingSubclass(FrozendictClass): def __new__(cls, *args, **kwargs): return super().__new__(cls, *args, **kwargs) @@ -21,35 +20,11 @@ def __missing__(self, key): return key -class TestFrozendictPySubclass( +class TestFrozendictSubclass( FrozendictCommonTest, FrozendictSubclassOnlyTest ): - FrozendictClass = FrozendictPySubclass - FrozendictMissingClass = FrozendictPyMissingSubclass - c_ext = False + FrozendictClass = FrozendictSubclass + FrozendictMissingClass = FrozendictMissingSubclass + c_ext = cool.c_ext is_subclass = is_subclass - - -if cool.c_ext: - class FrozendictSubclass(FrozendictClass): - def __new__(cls, *args, **kwargs): - return super().__new__(cls, *args, **kwargs) - - - class FrozendictMissingSubclass(FrozendictClass): - def __new__(cls, *args, **kwargs): - return super().__new__(cls, *args, **kwargs) - - def __missing__(self, key): - return key - - - class TestFrozendictSubclass( - FrozendictCommonTest, - FrozendictSubclassOnlyTest - ): - FrozendictClass = FrozendictSubclass - FrozendictMissingClass = FrozendictMissingSubclass - c_ext = cool.c_ext - is_subclass = is_subclass