From e5c30776b510a88f760ca701558778b08a591e9d Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Sun, 29 Jul 2018 08:48:50 +0200 Subject: Fix some typos and prepare for 0.4.5 --- tests/codec/ber/test_decoder.py | 16 ++++++++-------- tests/codec/ber/test_encoder.py | 4 ++-- tests/type/test_constraint.py | 3 +-- tests/type/test_tag.py | 8 ++++---- tests/type/test_univ.py | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) (limited to 'tests') diff --git a/tests/codec/ber/test_decoder.py b/tests/codec/ber/test_decoder.py index d456949..e8e17f0 100644 --- a/tests/codec/ber/test_decoder.py +++ b/tests/codec/ber/test_decoder.py @@ -333,7 +333,7 @@ class ObjectIdentifierDecoderTestCase(BaseTestCase): except PyAsn1Error: pass else: - assert 0, 'Leading 0x80 tolarated' + assert 0, 'Leading 0x80 tolerated' def testLeading0x80Case2(self): try: @@ -343,7 +343,7 @@ class ObjectIdentifierDecoderTestCase(BaseTestCase): except PyAsn1Error: pass else: - assert 0, 'Leading 0x80 tolarated' + assert 0, 'Leading 0x80 tolerated' def testLeading0x80Case3(self): try: @@ -353,7 +353,7 @@ class ObjectIdentifierDecoderTestCase(BaseTestCase): except PyAsn1Error: pass else: - assert 0, 'Leading 0x80 tolarated' + assert 0, 'Leading 0x80 tolerated' def testLeading0x80Case4(self): try: @@ -363,7 +363,7 @@ class ObjectIdentifierDecoderTestCase(BaseTestCase): except PyAsn1Error: pass else: - assert 0, 'Leading 0x80 tolarated' + assert 0, 'Leading 0x80 tolerated' def testTagFormat(self): try: @@ -379,7 +379,7 @@ class ObjectIdentifierDecoderTestCase(BaseTestCase): except PyAsn1Error: pass else: - assert 0, 'zero length tolarated' + assert 0, 'zero length tolerated' def testIndefiniteLength(self): try: @@ -429,12 +429,12 @@ class RealDecoderTestCase(BaseTestCase): ints2octs((9, 3, 160, 254, 1)) ) == (univ.Real((1, 2, -8)), null) - def testBin4(self): # check exponenta = 0 + def testBin4(self): # check exponent = 0 assert decoder.decode( # (1, 2, 0) encoded with base = 2 ints2octs((9, 3, 128, 0, 1)) ) == (univ.Real((1, 2, 0)), null) - def testBin5(self): # case of 2 octs for exponenta and negative exponenta + def testBin5(self): # case of 2 octs for exponent and negative exponent assert decoder.decode( # (3, 2, -1020) encoded with base = 16 ints2octs((9, 4, 161, 255, 1, 3)) ) == (univ.Real((3, 2, -1020)), null) @@ -1092,7 +1092,7 @@ class SetDecoderWithSchemaTestCase(BaseTestCase): ints2octs((49, 15, 5, 0, 4, 11, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110)), asn1Spec=self.s ) == (self.s, null) - def testWithOptionaIndefMode(self): + def testWithOptionalIndefMode(self): self.__initWithOptional() assert decoder.decode( ints2octs((49, 128, 5, 0, 36, 128, 4, 11, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110, 0, 0, 0, 0)), asn1Spec=self.s diff --git a/tests/codec/ber/test_encoder.py b/tests/codec/ber/test_encoder.py index 81368a9..62ea9cc 100644 --- a/tests/codec/ber/test_encoder.py +++ b/tests/codec/ber/test_encoder.py @@ -392,14 +392,14 @@ class RealEncoderTestCase(BaseTestCase): # choose binEncBase automatically for all further Real (testBin[4-7]) binEncBase, encoder.typeMap[univ.Real.typeId].binEncBase = encoder.typeMap[univ.Real.typeId].binEncBase, None assert encoder.encode( - univ.Real((1, 2, 0)) # check exponenta = 0 + univ.Real((1, 2, 0)) # check exponent = 0 ) == ints2octs((9, 3, 128, 0, 1)) encoder.typeMap[univ.Real.typeId].binEncBase = binEncBase def testBin5(self): assert encoder.encode( univ.Real((3, 2, -1020)) # case of 2 octs for exponent and - # negative exponenta and abs(exponent) is + # negative exponent and abs(exponent) is # all 1's and fills the whole octet(s) ) == ints2octs((9, 4, 129, 252, 4, 3)) diff --git a/tests/type/test_constraint.py b/tests/type/test_constraint.py index 2cdc66e..78d4e31 100644 --- a/tests/type/test_constraint.py +++ b/tests/type/test_constraint.py @@ -25,7 +25,7 @@ class SingleValueConstraintTestCase(BaseTestCase): self.c2 = constraint.SingleValueConstraint(3, 4) def testCmp(self): - assert self.c1 == self.c1, 'comparation fails' + assert self.c1 == self.c1, 'comparison fails' def testHash(self): assert hash(self.c1) != hash(self.c2), 'hash() fails' @@ -195,7 +195,6 @@ class InnerTypeConstraintTestCase(BaseTestCase): try: c(4, 0) except error.ValueConstraintError: - raise assert 0, 'constraint check fails' try: c(4, 1) diff --git a/tests/type/test_tag.py b/tests/type/test_tag.py index e0cf483..10e76d5 100644 --- a/tests/type/test_tag.py +++ b/tests/type/test_tag.py @@ -31,10 +31,10 @@ class TagReprTestCase(TagTestCaseBase): class TagCmpTestCase(TagTestCaseBase): def testCmp(self): - assert self.t1 == self.t2, 'tag comparation fails' + assert self.t1 == self.t2, 'tag comparison fails' def testHash(self): - assert hash(self.t1) == hash(self.t2), 'tag hash comparation fails' + assert hash(self.t1) == hash(self.t2), 'tag hash comparison fails' def testSequence(self): assert self.t1[0] == self.t2[0] and \ @@ -62,13 +62,13 @@ class TagSetReprTestCase(TagSetTestCaseBase): class TagSetCmpTestCase(TagSetTestCaseBase): def testCmp(self): - assert self.ts1 == self.ts2, 'tag set comparation fails' + assert self.ts1 == self.ts2, 'tag set comparison fails' def testHash(self): assert hash(self.ts1) == hash(self.ts2), 'tag set hash comp. fails' def testLen(self): - assert len(self.ts1) == len(self.ts2), 'tag length comparation fails' + assert len(self.ts1) == len(self.ts2), 'tag length comparison fails' class TaggingTestSuite(TagSetTestCaseBase): diff --git a/tests/type/test_univ.py b/tests/type/test_univ.py index ab44f3a..44a3add 100644 --- a/tests/type/test_univ.py +++ b/tests/type/test_univ.py @@ -1065,7 +1065,7 @@ class SequenceOf(BaseTestCase): else: assert False, 'IndexError not raised' - # this is a deviation from standart sequence protocol + # this is a deviation from standard sequence protocol assert not s[1] def testSetItem(self): -- cgit v1.2.1