Skip to content

Commit

Permalink
Add missing class rename
Browse files Browse the repository at this point in the history
  • Loading branch information
egparedes committed Jan 19, 2024
1 parent d34836f commit af92ac1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/eve_tests/unit_tests/test_datamodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,26 +1187,26 @@ class BaseGenericModel(datamodels.GenericDataModel, Generic[T, U]):
with pytest.raises(TypeError, match=".value'"):
PartiallyConcretizedGenericModel(value=["1"])

FullySpecializedGenericModel = PartiallyConcretizedGenericModel[str]
FullyConcretizedGenericModel = PartiallyConcretizedGenericModel[str]

assert len(FullySpecializedGenericModel.__parameters__) == 0
assert len(FullyConcretizedGenericModel.__parameters__) == 0

FullySpecializedGenericModel(value=[])
FullySpecializedGenericModel(value=[(1, "value")])
FullyConcretizedGenericModel(value=[])
FullyConcretizedGenericModel(value=[(1, "value")])
with pytest.raises(TypeError, match=".value'"):
FullySpecializedGenericModel(value=1)
FullyConcretizedGenericModel(value=1)
with pytest.raises(TypeError, match=".value'"):
FullySpecializedGenericModel(value=(1, 2))
FullyConcretizedGenericModel(value=(1, 2))
with pytest.raises(TypeError, match=".value'"):
FullySpecializedGenericModel(value=[1.0])
FullyConcretizedGenericModel(value=[1.0])
with pytest.raises(TypeError, match=".value'"):
FullySpecializedGenericModel(value=["1"])
FullyConcretizedGenericModel(value=["1"])
with pytest.raises(TypeError, match=".value'"):
FullySpecializedGenericModel(value=1)
FullyConcretizedGenericModel(value=1)
with pytest.raises(TypeError, match=".value'"):
FullySpecializedGenericModel(value=[(1, 2)])
FullyConcretizedGenericModel(value=[(1, 2)])
with pytest.raises(TypeError, match=".value'"):
FullySpecializedGenericModel(value=[(1, (11, 12))])
FullyConcretizedGenericModel(value=[(1, (11, 12))])

def test_partial_concretization_with_typevar(self):
class PartialGenericModel(datamodels.GenericDataModel, Generic[T]):
Expand Down

0 comments on commit af92ac1

Please sign in to comment.