Allow 3-part version string lookups, e.g 2.7.1

We allow a float here, but if passed a string like
'2.7'. or  '2.7.13', accept that in looking up
either a scanner or a parser.
This commit is contained in:
rocky
2017-08-13 09:17:07 -04:00
parent 503039ab51
commit f4ceb6304d
3 changed files with 47 additions and 0 deletions

11
pytest/test_basic.py Normal file
View File

@@ -0,0 +1,11 @@
from uncompyle6.scanner import get_scanner
from uncompyle6.parser import get_python_parser
def test_get_scanner():
# See that we can retrieve a scanner using a full version number
assert get_scanner('2.7.13')
def test_get_parser():
# See that we can retrieve a sparser using a full version number
assert get_python_parser('2.7.13')