Skip to content

Commit bce6f49

Browse files
lemenkoveerimoq
authored andcommitted
Fixes for pyparsing 3.1.2
- Fix tests output - Bump dependency version Fixes #167. Signed-off-by: Peter Lemenkov <[email protected]>
1 parent c890898 commit bce6f49

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pyparsing>=3.0.6,<3.1
1+
pyparsing>=3.1.2
22
codespell
33
pyasn1
44
asn1crypto

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def find_version():
2727
url='https://github.com/eerimoq/asn1tools',
2828
packages=find_packages(exclude=['tests']),
2929
install_requires=[
30-
'pyparsing>=3.0.6',
30+
'pyparsing>=3.1.2',
3131
'bitstruct'
3232
],
3333
extras_require={

tests/test_parse.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ def test_parse_error_sequence_missing_type(self):
332332

333333
self.assertEqual(
334334
str(cm.exception),
335-
"Invalid ASN.1 syntax at line 1, column 43: 'A DEFINITIONS ::= BEGIN "
336-
" A ::= SEQUENCE { >!<a } END': Expected Type.")
335+
"Invalid ASN.1 syntax at line 1, column 45: 'A DEFINITIONS ::= BEGIN "
336+
" A ::= SEQUENCE { a >!<} END': Expected Type.")
337337

338338
def test_parse_error_sequence_missing_member_name(self):
339339
with self.assertRaises(asn1tools.ParseError) as cm:
@@ -344,7 +344,7 @@ def test_parse_error_sequence_missing_member_name(self):
344344
self.assertEqual(
345345
str(cm.exception),
346346
"Invalid ASN.1 syntax at line 1, column 43: 'A DEFINITIONS ::= "
347-
"BEGIN A ::= SEQUENCE { >!<A } END': Expected Type.")
347+
"BEGIN A ::= SEQUENCE { >!<A } END': Expected '}'.")
348348

349349
def test_parse_error_definitive_identifier(self):
350350
with self.assertRaises(asn1tools.ParseError) as cm:
@@ -366,8 +366,8 @@ def test_parse_error_missing_union_member_beginning(self):
366366

367367
self.assertEqual(
368368
str(cm.exception),
369-
"Invalid ASN.1 syntax at line 1, column 39: 'A DEFINITIONS ::= BEGIN "
370-
"B ::= INTEGER >!<(| SIZE (1))END': Expected END.")
369+
"Invalid ASN.1 syntax at line 1, column 40: 'A DEFINITIONS ::= BEGIN "
370+
"B ::= INTEGER (>!<| SIZE (1))END': Expected one or more constraints.")
371371

372372
def test_parse_error_missing_union_member_middle(self):
373373
with self.assertRaises(asn1tools.ParseError) as cm:
@@ -377,8 +377,8 @@ def test_parse_error_missing_union_member_middle(self):
377377

378378
self.assertEqual(
379379
str(cm.exception),
380-
"Invalid ASN.1 syntax at line 1, column 39: \'A DEFINITIONS "
381-
"::= BEGIN B ::= INTEGER >!<(SIZE (1) | | (0))END\': Expected END.")
380+
"Invalid ASN.1 syntax at line 1, column 49: \'A DEFINITIONS "
381+
"::= BEGIN B ::= INTEGER (SIZE (1) >!<| | (0))END\': Expected ')'.")
382382

383383
def test_parse_error_missing_union_member_end(self):
384384
with self.assertRaises(asn1tools.ParseError) as cm:
@@ -388,8 +388,8 @@ def test_parse_error_missing_union_member_end(self):
388388

389389
self.assertEqual(
390390
str(cm.exception),
391-
"Invalid ASN.1 syntax at line 1, column 39: \'A DEFINITIONS "
392-
"::= BEGIN B ::= INTEGER >!<(SIZE (1) |)END\': Expected END.")
391+
"Invalid ASN.1 syntax at line 1, column 49: \'A DEFINITIONS "
392+
"::= BEGIN B ::= INTEGER (SIZE (1) >!<|)END\': Expected ')'.")
393393

394394
def test_parse_error_size_constraint_missing_parentheses(self):
395395
with self.assertRaises(asn1tools.ParseError) as cm:
@@ -463,7 +463,7 @@ def test_parse_error_late_extension_additions(self):
463463
str(cm.exception),
464464
"Invalid ASN.1 syntax at line 1, column 63: \'A DEFINITIONS ::= "
465465
"BEGIN Foo ::= SEQUENCE { a BOOLEAN, ..., ...>!<, [[ c BOOLEAN ]] "
466-
"} END\': Expected Type.")
466+
"} END\': Expected '}'.")
467467

468468
def test_parse_error_too_many_extension_markers(self):
469469
with self.assertRaises(asn1tools.ParseError) as cm:
@@ -487,7 +487,7 @@ def test_parse_error_too_many_extension_markers(self):
487487
str(cm.exception),
488488
"Invalid ASN.1 syntax at line 1, column 108: \'A DEFINITIONS ::= "
489489
"BEGIN Foo ::= SEQUENCE { a BOOLEAN, ..., [[ b BOOLEAN ]], [[ c "
490-
"BOOLEAN ]], ..., d BOOLEAN>!<, ... } END\': Expected Type.")
490+
"BOOLEAN ]], ..., d BOOLEAN>!<, ... } END\': Expected '}'.")
491491

492492
def test_parse_error_missing_single_line_comment_end(self):
493493
with self.assertRaises(asn1tools.ParseError) as cm:

0 commit comments

Comments
 (0)