summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-07-29 08:48:50 +0200
committerIlya Etingof <etingof@gmail.com>2018-07-29 09:23:39 +0200
commite5c30776b510a88f760ca701558778b08a591e9d (patch)
treecc44e15cac511603b9437bc0c80c989af091d4b3 /tests
parent4ad415d71beb6b466842e6c32ec6387b88a3dbae (diff)
downloadpyasn1-git-e5c30776b510a88f760ca701558778b08a591e9d.tar.gz
Fix some typos and prepare for 0.4.5
Diffstat (limited to 'tests')
-rw-r--r--tests/codec/ber/test_decoder.py16
-rw-r--r--tests/codec/ber/test_encoder.py4
-rw-r--r--tests/type/test_constraint.py3
-rw-r--r--tests/type/test_tag.py8
-rw-r--r--tests/type/test_univ.py2
5 files changed, 16 insertions, 17 deletions
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):