Browse Source

Fill out test coverage

tags/nilmdb-1.8.1
Jim Paris 9 years ago
parent
commit
fc43107307
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      tests/test_interval.py

+ 8
- 0
tests/test_interval.py View File

@@ -59,6 +59,14 @@ class TestInterval:
self.test_interval_intersect()
Interval = NilmdbInterval

# Other helpers in nilmdb.utils.interval
i = [ UtilsInterval(1,2), UtilsInterval(2,3), UtilsInterval(4,5) ]
eq_(list(nilmdb.utils.interval.optimize(i)),
[ UtilsInterval(1,3), UtilsInterval(4,5) ])
eq_(UtilsInterval(1234567890123456, 1234567890654321).human_string(),
"[ Fri, 13 Feb 2009 18:31:30.123456 -0500 -> " +
"Fri, 13 Feb 2009 18:31:30.654321 -0500 ]")

def test_interval(self):
# Test Interval class
os.environ['TZ'] = "America/New_York"


Loading…
Cancel
Save