Commit Graph

768 Commits

Author SHA1 Message Date
9126980ed4 Add tests for bash completion; fix Unicode bug that turned up
Note that argcomplete is also now required.
2019-08-30 00:15:29 -04:00
ea051c85b3 Improve test coverage for CORS_allow 2019-08-30 00:15:29 -04:00
d8294469cf Fix diskusage test coverage 2019-08-30 00:15:29 -04:00
96eadb0577 Add test for WSGI server, and fix a str/bytes bug that it found 2019-08-30 00:15:29 -04:00
fb524c649f Remove old workaround for some nosetests multiprocessing bug 2019-08-29 14:52:55 -04:00
19a34a07a4 Always use pyximport, since we now require cython.
This is optional and helps with development.  If we ever need/want to
support systems without Cython, this can be wrapped in a
try/except:pass block (and the .c files can be included in the
MANIFEST.in so that source distributions include them).
2019-08-29 14:52:55 -04:00
d8df6f515f Update setup.py and build instructions
This is a pretty big simplification: the user should first use pip to
install everything in `requirements.txt`, and we no longer try to
cater to cases where Cython is missing, etc.
2019-08-29 14:52:55 -04:00
90ee127c87 Move MANIFEST.in out from setup.py into its own file
This was in setup.py to reduce litter in the root directory, but it's
simpler to keep it how it's supposed to be.
2019-08-29 11:03:42 -04:00
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)
2019-08-28 18:17:55 -04:00
f587518adb Improve test coverage 2019-08-26 17:22:43 -04:00
efbb2665fe Improve test coverage 2019-08-26 17:08:00 -04:00
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
2019-08-26 16:19:26 -04:00
322b0ec423 Remove impossible error in serializer and test with a C module 2019-08-26 15:40:07 -04:00
f3833d9b20 Use pip fallocate package rather than hand-rolling 2019-08-26 15:34:14 -04:00
735c8497af Change == to >= in requirements.txt, so we aren't stuck in the past 2019-08-26 15:16:03 -04:00
7252e40c2d Move dependencies into requirements.txt 2019-08-26 15:14:21 -04:00
caa5604d81 Improve code coverage 2019-08-26 14:58:28 -04:00
6624e8dab6 Remove another "no cover" 2019-08-23 16:41:29 -04:00
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.
2019-08-23 16:35:40 -04:00
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