Пример #1
0
 def test_OptionalRepresentation_true(self):
     with pytest.warns(
         DeprecatedWarning,
         match='has_representation is deprecated.*The class OptionalRepresentation',
     ):
         or_ = OptionalRepresentation()
         or_.description = 'foo'
         assert or_.has_representation is True
Пример #2
0
 def test_OptionalRepresentation_false(self):
     with pytest.warns(
         DeprecatedWarning,
         match='has_representation is deprecated.*The class OptionalRepresentation'
     ):
         or_ = OptionalRepresentation()
         or_.description = None
         assert or_.has_representation is False