John-Mark Gurney
c6c64510b4
use included mock, use extras_require for coverage.
2 years ago
John-Mark Gurney
d940de70ea
fix to properly use UTC for datetimes.
The other test changes were needed because:
datetime[.]now() != b.astimezone(timezone.utc)
because of course the python datetime library is bad...
2 years ago
John-Mark Gurney
860a41c0f8
use builtin venv, and python3, also fail fast on tests..
2 years ago
John-Mark Gurney
01d8efffd7
update to version 2.0.0 to break w/ the Python 2 version.
The API hasn't changed, but want to help prevent confusion.
4 years ago
John-Mark Gurney
c404b8266e
update readme w/ python 3 support, and mention where to find python 2
4 years ago
John-Mark Gurney
127ad4ed83
forgot to update copyright to 2020.
4 years ago
John-Mark Gurney
b635cf31cf
make this work on python 3...
4 years ago
John-Mark Gurney
f5fd88e7b3
make the dumps default arg work for all container args...
This should also allow expansion if needed..
5 years ago
John-Mark Gurney
73539cfebc
add a makefile I use for developing pasn1.
It uses entr to watch for edits, and then automatically runs the tests
and prints out code coverage.
5 years ago
John-Mark Gurney
f2a06f4c6c
add test case that needs to be fixed... update copyright var
5 years ago
John-Mark Gurney
27ff594a26
fix a bug w/ decoding datetime's when there is a space in the data as
well...
5 years ago
John-Mark Gurney
3407ebe5a6
add support to dumps for the default arg, like json.dumps...
5 years ago
John-Mark Gurney
0978b3ce8e
this is required when running tests..
5 years ago
John-Mark Gurney
7faef04fd4
move mock to only where it's needed for tests
drop unneeded module..
5 years ago
John-Mark Gurney
72eb2a94e1
make this 1.0.1 since it now has a setup.py file..
7 years ago
John-Mark Gurney
ba1de73e85
make this a proper python module now..
7 years ago
John-Mark Gurney
92d88a7ba8
ignore coverage file
7 years ago
John-Mark Gurney
c06a88dd55
add ignore file
7 years ago
John-Mark Gurney
215d0b797b
mark this block as not coverage as it won't even in
unit tests..
7 years ago
John-Mark Gurney
2a76d40721
talk about ASN1Coder in the readme.
8 years ago
John-Mark Gurney
ea1dad8ebd
break out the non-standard support into it's own class.
The default still supports dict, but a pure standard encoder/decoder
is now available.
8 years ago
John-Mark Gurney
3d0e6aa4b7
add test case for spaces in datetime...
The real bug is that strptime doesn't error out, but it's likely
buggy on more than just MacOSX, so just catch it here.
8 years ago
John-Mark Gurney
8ce34a9628
add module metadata, including license..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1836]
8 years ago
John-Mark Gurney
9470ebde11
add README..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1835]
8 years ago
John-Mark Gurney
f31904b4e8
make dict be a constructed type, not a primitive..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1834]
8 years ago
John-Mark Gurney
ba77ad6e1f
minor doc changes..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1833]
8 years ago
John-Mark Gurney
61910433c0
remove unneeded lines, python already does that...
wrap lines to 80 where it made sense...
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1832]
8 years ago
John-Mark Gurney
147682b715
fix floating point large/small exponents, my constants were
too large/small..
don't allow exponents more than 2 bytes long, python can't
handle larger, and even quad (128bit) would still be
supported...
this gets code coverage to 99%, remaining is in test code..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1831]
8 years ago
John-Mark Gurney
e084525581
add test to assert that a TypeError is raised when an
unknown object is dump'd..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1830]
8 years ago
John-Mark Gurney
56ac492e8d
move these definitions before the tests...
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1829]
8 years ago
John-Mark Gurney
15cacbf24b
make sure datetime strings end in Z when decoding..
move some code close and add a comment to the fuzzing test that
detected failures should be added to test_invalids..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1828]
8 years ago
John-Mark Gurney
ab9eec324b
remove unused class...
add support for coercion..
now that tags are not part of the enc_ function, make enc_set
an alias for enc_list...
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1827]
8 years ago
John-Mark Gurney
370505f336
add some docs...
add the correct ending to the exception when everything isn't
consumed..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1826]
8 years ago
John-Mark Gurney
4c68f0e4cc
add support for datetime..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1825]
9 years ago
John-Mark Gurney
62ca959694
add the datetime/delta objects to implement..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1824]
9 years ago
John-Mark Gurney
02e8165cd1
add a test that fuzzes the loading process to make sure that
any changes to the laod string is either caught, or makes a
change to the returned objects...
Add a few tests found by the fuzzing routines to make sure
they are continue to be detected even if fuzzing is turned off..
fixes caught, reading past end of list, set and dict... Various float
parameters now raise errors when invalid..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1823]
9 years ago
John-Mark Gurney
17fc600564
remove unneeded code, add some comments for additional tests to write..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1822]
9 years ago
John-Mark Gurney
c35550e00d
add support for decoding floats... Add support for encoding
negative exponents...
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1821]
9 years ago
John-Mark Gurney
b2cf3ef9bf
add a long string for testing..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1820]
9 years ago
John-Mark Gurney
0c8e0e355c
enforce all ones for true bool...
test long strings...
test for invalid bool..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1819]
9 years ago
John-Mark Gurney
9a5c72e6c9
none -> null.. remove prints, add test cases..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1818]
9 years ago
John-Mark Gurney
67c86d3494
add inital version of this code..
only special float values work..
various time formats not supported..
[git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1817]
9 years ago