Browse Source

Test python version of Interval too

tags/nilmdb-1.4.1
Jim Paris 10 years ago
parent
commit
22274550ab
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      tests/test_interval.py

+ 12
- 0
tests/test_interval.py View File

@@ -11,6 +11,9 @@ import itertools
from nilmdb.utils.interval import IntervalError
from nilmdb.server.interval import Interval, DBInterval, IntervalSet

# so we can test them separately
from nilmdb.utils.interval import Interval as UtilsInterval

from testutil.helpers import *
import unittest

@@ -47,6 +50,15 @@ def makeset(string):
return iset

class TestInterval:
def test_client_interval(self):
# Run interval tests against the Python version of Interval.
global Interval
NilmdbInterval = Interval
Interval = UtilsInterval
self.test_interval()
self.test_interval_intersect()
Interval = NilmdbInterval

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


Loading…
Cancel
Save