self.assertSequenceEqual(obj.impl, impl_tag)
self.assertFalse(obj.expled)
- @given(binary())
+ @given(binary(min_size=1))
def test_expl_inherited(self, expl_tag):
class Inherited(self.base_klass):
expl = expl_tag
list(obj.pps())
pprint(obj, big_blobs=True, with_decode_path=True)
- @given(booleans(), booleans(), binary(), binary())
+ @given(booleans(), booleans(), binary(min_size=1), binary(min_size=1))
def test_comparison(self, value1, value2, tag1, tag2):
for klass in (Boolean, BooleanInherited):
obj1 = klass(value1)
pprint(obj, big_blobs=True, with_decode_path=True)
hash(obj)
- @given(integers(), integers(), binary(), binary())
+ @given(integers(), integers(), binary(min_size=1), binary(min_size=1))
def test_comparison(self, value1, value2, tag1, tag2):
for klass in (Integer, IntegerInherited):
obj1 = klass(value1)
list(obj.pps())
pprint(obj, big_blobs=True, with_decode_path=True)
- @given(binary(), binary())
+ @given(binary(min_size=1), binary(min_size=1))
def test_comparison(self, tag1, tag2):
for klass in (Null, NullInherited):
obj1 = klass(impl=tag1)
pprint(obj, big_blobs=True, with_decode_path=True)
hash(obj)
- @given(oid_strategy(), oid_strategy(), binary(), binary())
+ @given(oid_strategy(), oid_strategy(), binary(min_size=1), binary(min_size=1))
def test_comparison(self, value1, value2, tag1, tag2):
for klass in (ObjectIdentifier, ObjectIdentifierInherited):
obj1 = klass(value1)
list(obj.pps())
pprint(obj, big_blobs=True, with_decode_path=True)
- @given(integers(), integers(), binary(), binary())
+ @given(integers(), integers(), binary(min_size=1), binary(min_size=1))
def test_comparison(self, value1, value2, tag1, tag2):
class E(Enumerated):
schema = (
pprint(obj, big_blobs=True, with_decode_path=True)
self.assertSequenceEqual(obj.encode(), integer_encoded)
- @given(binary(), binary())
+ @given(binary(min_size=1), binary(min_size=1))
def test_comparison(self, value1, value2):
for klass in (Any, AnyInherited):
obj1 = klass(value1)
min_size=1,
)).items())
tags = [tag_encode(tag) for tag in d.draw(sets(
- integers(min_value=0),
+ integers(min_value=1),
min_size=len(_schema),
max_size=len(_schema),
))]
def test_missing_from_spec(self, d):
names = list(d.draw(sets(text_letters(), min_size=2)))
tags = [tag_encode(tag) for tag in d.draw(sets(
- integers(min_value=0),
+ integers(min_value=1),
min_size=len(names),
max_size=len(names),
))]
with assertRaisesRegex(self, ValueError, "schema must be specified"):
self.base_klass.__mro__[1]()
- @given(booleans(), booleans(), binary(), binary())
+ @given(booleans(), booleans(), binary(min_size=1), binary(min_size=1))
def test_comparison(self, value1, value2, tag1, tag2):
class SeqOf(self.base_klass):
schema = Boolean()