Commit Graph

699 Commits

Author SHA1 Message Date
39e66fe38c Test exclusive_lock better 2019-08-23 16:23:15 -04:00
ba915bb290 Use os.replace instead of os.remove; remove a "no cover" 2019-08-23 16:23:07 -04:00
3f0b8e50a2 Split off misc tests; add coverage for failure case in exclusive_lock 2019-08-23 16:04:42 -04:00
f93edc469c Remove dummy lock functions from lock.py 2019-08-23 16:04:29 -04:00
087fb39475 Add tests for two more "no cover" blocks 2019-08-23 16:03:59 -04:00
8b4acf41d6 Test previously untested code 2019-08-23 15:24:47 -04:00
32a76ccf3f Clean up __pycache__ on "make clean" 2019-08-23 15:24:33 -04:00
5f9367bdd3 Remove old python 2 code 2019-08-23 15:14:57 -04:00
5848d03507 Fix install instructions for python3 2019-08-14 23:16:38 -04:00
36dc448f02 Remove old files from .coveragerc exclusions 2019-08-14 19:42:00 -04:00
2764283f59 Improve test coverage 2019-08-14 19:27:33 -04:00
2d0c3f7868 Improve test coverage for interval.py 2019-08-14 19:24:33 -04:00
cadba9fbba Fix branch coverage 2019-08-14 19:23:50 -04:00
2d200a86c9 Improve test coverage 2019-08-14 18:56:40 -04:00
640c1bc95e No need to catch exceptions here; they shouldn't occur 2019-08-14 18:55:01 -04:00
b574fc86f4 Mark branch as not taken in test suite 2019-08-14 18:25:30 -04:00
02ee18c410 Improve test coverage 2019-08-14 18:22:55 -04:00
d1e241a213 Test calling NilmDB.close twice to improve coverage 2019-08-14 18:22:50 -04:00
c5c7f638e7 Allow NilmDB.close to be called twice 2019-08-14 18:22:32 -04:00
a1218fd20b Remove superfluous conditional 2019-08-14 18:22:14 -04:00
c58a933d21 Improve branch coverage 2019-08-14 18:06:57 -04:00
7874e1ebfa Improve coverage 2019-08-14 18:02:54 -04:00
79b410a85b Remove conditional as we know these args are always present 2019-08-14 18:02:33 -04:00
6645395924 Improve branch coverage for numpyclient 2019-08-14 14:00:14 -04:00
beb3eadd38 Include branches in coverage report 2019-08-14 14:00:03 -04:00
edf4568e8f Fix error in interval comparisons; add coverage 2019-08-14 13:42:39 -04:00
a962258b2a Improve coverage for bulkdata 2019-08-14 13:37:58 -04:00
fa011559c1 Fix bulkdata bug checking for paths ending in / 2019-08-14 13:37:46 -04:00
349eec3942 Improve coverage for client 2019-08-14 13:33:50 -04:00
99500f3a88 Update coverage config 2019-08-14 12:57:57 -04:00
54eccb17aa Adjust test for new argparse output 2019-08-13 16:08:52 -04:00
cc8ac74a37 Put good and bad UTF-8 into one of the test data files 2019-08-13 16:08:39 -04:00
3be904d158 Work around a Numpy deprecation warning 2019-08-13 16:07:57 -04:00
5d9fc5500c Make httpclient.put take a content-type instead of picking one
No reason to push the content-type decision into httpclient
2019-08-13 16:07:00 -04:00
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.
2019-08-13 15:53:05 -04:00
1c005518d8 Remove old unicode helpers 2019-08-01 17:49:08 -04:00
3279f7ef2c Fix misnamed function 2019-08-01 17:39:32 -04:00
a2e124f444 Make command a required argument for new argparse changes 2019-08-01 17:38:01 -04:00
6d673bd2be Fix commandline test character encoding issues for Py3 2019-08-01 17:38:01 -04:00
613a3185e3 Avoid FutureWarning from Numpy 2019-08-01 17:38:01 -04:00
c83ee65cf7 Fix integer divisions for Python 3 2019-08-01 17:38:01 -04:00
113633459d Don't wait for thread to exit in __del__
This can hit a deadlock waiting for the thread to exit.  We don't
need to wait; it will die when it can, or get terminated when the
interpreter exits.
2019-08-01 17:38:01 -04:00
41abf53085 Remove references to local copy of datetime_tz 2019-08-01 17:38:01 -04:00
fef3e1d31e Fix various string/bytes issues with Python 3 2019-08-01 17:37:45 -04:00
02db87eee6 Fix encoding issues in HTTP chunked responses 2019-08-01 17:36:44 -04:00
ad85c3dd29 CherryPy bug 1200 is no longer an issue 2019-08-01 17:36:44 -04:00
0e6ccd687b Fix missing Exception.message in Python 3 2019-08-01 17:36:44 -04:00
85d4c419fd Decode server responses from raw bytes to strings
Uses utf-8, or whatever the server response indicates.
2019-08-01 17:36:44 -04:00
159278066c Fix datetime_tz import 2019-08-01 17:36:44 -04:00
b69358a185 Fix error with reraising exceptions in serializer 2019-08-01 17:36:44 -04:00