Browse Source

Fix test that would fail if reordered, or in a different timezone

tags/nilmdb-1.10.1^0
Jim Paris 6 years ago
parent
commit
45c81d2019
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      tests/test_timestamper.py

+ 3
- 0
tests/test_timestamper.py View File

@@ -1,5 +1,6 @@
import nilmdb
from nilmdb.utils.printf import *
from nilmdb.utils import datetime_tz

from nose.tools import *
from nose.tools import assert_raises
@@ -19,6 +20,8 @@ class TestTimestamper(object):
def join(list):
return "\n".join(list) + "\n"

datetime_tz.localtz_set("America/New_York")

start = nilmdb.utils.time.parse_time("03/24/2012")
lines_in = [ "hello", "world", "hello world", "# commented out" ]
lines_out = [ "1332561600000000 hello",


Loading…
Cancel
Save