Jim Paris
0b631b7dea
Use built-in json module rather than external simplejson
simplejson was there for python <= 2.6 compatibility.
It's not needed now, and installing it with pip can lead to segfaults
because pip is dumb.
(see e.g. https://github.com/simplejson/simplejson/issues/114 )
4 years ago
Jim Paris
f587518adb
Improve test coverage
4 years ago
Jim Paris
efbb2665fe
Improve test coverage
4 years ago
Jim Paris
544413018c
Add some thread safety tests
We don't actually use nilmdb.utils.threadsafety.verify_proxy in the
main NilmDB code, but it's useful for finding errors.
It found an issue with __getattr__ in SerializerProxy which
(1) can't be avoided?
(2) is now commented in the code
(3) shouldn't matter in real use
4 years ago
Jim Paris
322b0ec423
Remove impossible error in serializer and test with a C module
4 years ago
Jim Paris
f3833d9b20
Use pip fallocate package rather than hand-rolling
4 years ago
Jim Paris
735c8497af
Change == to >= in requirements.txt, so we aren't stuck in the past
4 years ago
Jim Paris
7252e40c2d
Move dependencies into requirements.txt
4 years ago
Jim Paris
caa5604d81
Improve code coverage
4 years ago
Jim Paris
6624e8dab6
Remove another "no cover"
4 years ago
Jim Paris
d907638858
Remove unnecessary check for private members in serializer
__getattr__ is only called for attributes that don't exist; callers
should never purposely see the private __* symbols, so we don't need
to check for them.
4 years ago
Jim Paris
39e66fe38c
Test exclusive_lock better
4 years ago
Jim Paris
ba915bb290
Use os.replace instead of os.remove; remove a "no cover"
4 years ago
Jim Paris
3f0b8e50a2
Split off misc tests; add coverage for failure case in exclusive_lock
4 years ago
Jim Paris
f93edc469c
Remove dummy lock functions from lock.py
4 years ago
Jim Paris
087fb39475
Add tests for two more "no cover" blocks
4 years ago
Jim Paris
8b4acf41d6
Test previously untested code
4 years ago
Jim Paris
32a76ccf3f
Clean up __pycache__ on "make clean"
4 years ago
Jim Paris
5f9367bdd3
Remove old python 2 code
4 years ago
Jim Paris
5848d03507
Fix install instructions for python3
4 years ago
Jim Paris
36dc448f02
Remove old files from .coveragerc exclusions
4 years ago
Jim Paris
2764283f59
Improve test coverage
4 years ago
Jim Paris
2d0c3f7868
Improve test coverage for interval.py
4 years ago
Jim Paris
cadba9fbba
Fix branch coverage
4 years ago
Jim Paris
2d200a86c9
Improve test coverage
4 years ago
Jim Paris
640c1bc95e
No need to catch exceptions here; they shouldn't occur
4 years ago
Jim Paris
b574fc86f4
Mark branch as not taken in test suite
4 years ago
Jim Paris
02ee18c410
Improve test coverage
4 years ago
Jim Paris
d1e241a213
Test calling NilmDB.close twice to improve coverage
4 years ago
Jim Paris
c5c7f638e7
Allow NilmDB.close to be called twice
4 years ago
Jim Paris
a1218fd20b
Remove superfluous conditional
4 years ago
Jim Paris
c58a933d21
Improve branch coverage
4 years ago
Jim Paris
7874e1ebfa
Improve coverage
4 years ago
Jim Paris
79b410a85b
Remove conditional as we know these args are always present
4 years ago
Jim Paris
6645395924
Improve branch coverage for numpyclient
4 years ago
Jim Paris
beb3eadd38
Include branches in coverage report
4 years ago
Jim Paris
edf4568e8f
Fix error in interval comparisons; add coverage
4 years ago
Jim Paris
a962258b2a
Improve coverage for bulkdata
4 years ago
Jim Paris
fa011559c1
Fix bulkdata bug checking for paths ending in /
4 years ago
Jim Paris
349eec3942
Improve coverage for client
4 years ago
Jim Paris
99500f3a88
Update coverage config
4 years ago
Jim Paris
54eccb17aa
Adjust test for new argparse output
4 years ago
Jim Paris
cc8ac74a37
Put good and bad UTF-8 into one of the test data files
4 years ago
Jim Paris
3be904d158
Work around a Numpy deprecation warning
4 years ago
Jim Paris
5d9fc5500c
Make httpclient.put take a content-type instead of picking one
No reason to push the content-type decision into httpclient
4 years ago
Jim Paris
57751f5b32
Consistently use bytes everywhere for stream data
Previous commits went back and forth a bit on whether the various APIs
should use bytes or strings, but bytes appears to be a better answer,
because actual data in streams will always be 7-bit ASCII or raw
binary. There's no reason to apply the performance penalty of
constantly converting between bytes and strings.
One drawback now is that lots of code now has to have "b" prefixes on
strings, especially in tests, which inflates this commit quite a bit.
4 years ago
Jim Paris
1c005518d8
Remove old unicode helpers
4 years ago
Jim Paris
3279f7ef2c
Fix misnamed function
4 years ago
Jim Paris
a2e124f444
Make command a required argument for new argparse changes
4 years ago
Jim Paris
6d673bd2be
Fix commandline test character encoding issues for Py3
4 years ago