When some of the individual tests fail to run, the `make test` target would
still pass since test/problems would not return an error which could hide the
fact that there are problems in the test.
With this change, if you do not have the python dateutil package, you will now
get output like:
'test_totals.t' failed to run any tests.
Passed: 975
Failed: 1
Unexpected successes: 0
Skipped: 0
Expected failures: 0
Runtime: 4.83 seconds
Or, if you do not have UTF-8 encoding set in your language you will get
something like:
'track.t' failed to run all tests.
'stop.t' failed to run all tests.
'start.t' failed to run all tests.
'test_totals.t' failed to run all tests.
Passed: 941
Failed: 50
Unexpected successes: 0
Skipped: 0
Expected failures: 0
Runtime: 4.55 seconds
This test updates one of the existing tests to make sure that an non-synthetic
interval in addition with the synthetic intervals can be moved properly.
getIntervalsByIds will be used by commands that are loading complete database
currently when they really want a few intervals that the user specified by ID.
Related to issue #245
The getUntracked, called as part of the `timew gaps` command, is
normally looking at a relatively recent interval. We do not want to take
the performance hit of loading the entire database into memory when
processing this command.
Related to issue #245
The database class now separatly tracks tag information. So for the one
place where all the inclusions were iterated over in order to build up a
tag set, we now instead ask the database for this set directly.
Related to issue #245
This does not appear to be necessary anymore given that the database lines are
generated from intervals and are all well formed. Any open interval *should* be
at the end of the database.
Related to issue #245.
intervalSummarize is called at the end of most commands. The cost of parsing
all the lines in the database can be significant as the size of the database
grows.
Related to issue #245.
This allows the database to be treated as a single collection of strings, but
can be used to avoid loading the entire database when only interested in recent
entries.
Related to issue #245.
Not only does this eliminate the need to copy the stings to the caller, it will
also eliminate the need for any iterators over the entries in the Database from
having to hold a copy of the lines from the Datafile.
Related to #245.
Since the switch to python3, there is another method that starts with "test"
higher up in the stack which produces unhelpful file / line information on a
failed test like:
ERROR: CommandError on file /usr/lib/python3.6/unittest/case.py line 59 in testPartExecutor: 'yield':
This change restores the previous behavior from before the switch to python 3.