Skip to content

Commit

Permalink
Fix test that depended on local time, 2
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-plan9 committed Dec 9, 2015
1 parent 25cb556 commit 3e2d247
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/test_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,12 +1133,11 @@ def test_datetype(self):
t = beets.library.DateType()

# format
self.assertEqual(time.strftime(beets.config['time_format'].
get(unicode),
time.localtime(123456789)),
t.format(123456789))
time_local = time.strftime(beets.config['time_format'].get(unicode),
time.localtime(123456789))
self.assertEqual(time_local, t.format(123456789))
# parse
self.assertEqual(123456789.0, t.parse('1973-11-29 22:33:09'))
self.assertEqual(123456789.0, t.parse(time_local))
self.assertEqual(123456789.0, t.parse('123456789.0'))
self.assertEqual(t.null, t.parse('not123456789.0'))
self.assertEqual(t.null, t.parse('1973-11-29'))
Expand Down

0 comments on commit 3e2d247

Please sign in to comment.