forked from pegler/pytzwhere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/pegler/pytzwhere
* 'master' of https://github.com/pegler/pytzwhere: Update README to include example for forceTZ add worldtest.json.gz to manifest. bump version bump to 3.0.2 Reduces size of module bt 1/3. Achieves 94% code coverage, relating to pegler#8. Closes pegler#45. This is also an update to pegler#46 and @seahawks code to include the files on the MANIFEST file.. add json files to MANIFEST.in, remove obsolete .csv file
- Loading branch information
Showing
8 changed files
with
80 additions
and
27,753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include LICENSE | ||
include README.md | ||
include tzwhere/tz_world.csv | ||
include tzwhere/tz_world_shortcuts.json | ||
include tzwhere/tz_world.json.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
|
||
################################## | ||
# Standard library imports | ||
################################## | ||
|
||
import os | ||
import datetime | ||
from unittest import TestCase | ||
|
||
################################## | ||
# Custom library imports | ||
################################## | ||
|
||
from tzwhere import tzwhere | ||
from tzwhere.tzwhere import BASE_DIR | ||
|
||
|
||
#################################### | ||
|
||
class TestTzwhereUtilities(TestCase): | ||
def test_preparemap_class(self): | ||
""" | ||
Tests the prepareMap class which writes shortcuts file. Test looks | ||
at modified date to see if that's equivalent to today's date | ||
:return: | ||
Unit test response | ||
""" | ||
|
||
a = tzwhere.prepareMap() | ||
location = os.path.join(BASE_DIR, 'tzwhere', 'tz_world_shortcuts.json') | ||
date = datetime.datetime.now().date() | ||
modified = datetime.datetime. \ | ||
fromtimestamp(os.stat(location).st_mtime).date() | ||
return self.assertEqual(date, modified) |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters