summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Mazuel <laurent.mazuel@gmail.com>2017-06-29 01:34:56 (GMT)
committerLaurent Mazuel <laurent.mazuel@gmail.com>2017-06-29 01:40:41 (GMT)
commit0f2a41a33dbc4624f265dfdf62ef9ba68e8e9605 (patch)
tree921877b340544869691a521c20a8e7e8f57be384
parentad4e50bd7cdb697606148d434e803fdf7f647f8d (diff)
downloadisodate-0f2a41a33dbc4624f265dfdf62ef9ba68e8e9605.tar.gz
Flake happiness
-rw-r--r--setup.py6
-rw-r--r--src/isodate/isoduration.py1
-rw-r--r--src/isodate/isotime.py6
-rw-r--r--src/isodate/tests/__init__.py1
-rw-r--r--src/isodate/tests/test_date.py1
-rw-r--r--src/isodate/tests/test_datetime.py1
-rw-r--r--src/isodate/tests/test_duration.py1
-rw-r--r--src/isodate/tests/test_pickle.py3
-rw-r--r--src/isodate/tests/test_strf.py1
-rw-r--r--src/isodate/tests/test_time.py1
-rw-r--r--src/isodate/tzinfo.py2
11 files changed, 17 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 2778886..8069830 100644
--- a/setup.py
+++ b/setup.py
@@ -26,16 +26,16 @@
# CONTRACT, STRICT LIABILITY, OR TORT
##############################################################################
import os
-import sys
+from setuptools import setup
setupargs = {}
-
-from setuptools import setup
setupargs['test_suite'] = 'isodate.tests.test_suite'
+
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
setup(name='isodate',
version='0.5.5.dev',
packages=['isodate', 'isodate.tests'],
diff --git a/src/isodate/isoduration.py b/src/isodate/isoduration.py
index ab13acb..d64b3c0 100644
--- a/src/isodate/isoduration.py
+++ b/src/isodate/isoduration.py
@@ -55,6 +55,7 @@ ISO8601_PERIOD_REGEX = re.compile(
if sys.version_info[0] >= 3:
basestring = str
+
def parse_duration(datestring):
"""
Parses an ISO 8601 durations into datetime.timedelta or Duration objects.
diff --git a/src/isodate/isotime.py b/src/isodate/isotime.py
index c6d9391..a430982 100644
--- a/src/isodate/isotime.py
+++ b/src/isodate/isotime.py
@@ -36,13 +36,13 @@ import sys
from decimal import Decimal
from datetime import time
-if sys.version_info > (3,):
- long = int
-
from isodate.isostrf import strftime, TIME_EXT_COMPLETE, TZ_EXT
from isodate.isoerror import ISO8601Error
from isodate.isotzinfo import TZ_REGEX, build_tzinfo
+if sys.version_info > (3,):
+ long = int
+
TIME_REGEX_CACHE = []
# used to cache regular expressions to parse ISO time strings.
diff --git a/src/isodate/tests/__init__.py b/src/isodate/tests/__init__.py
index 09dba2e..b1d46bd 100644
--- a/src/isodate/tests/__init__.py
+++ b/src/isodate/tests/__init__.py
@@ -46,5 +46,6 @@ def test_suite():
test_pickle.test_suite(),
])
+
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
diff --git a/src/isodate/tests/test_date.py b/src/isodate/tests/test_date.py
index fdc1043..2fcc588 100644
--- a/src/isodate/tests/test_date.py
+++ b/src/isodate/tests/test_date.py
@@ -125,5 +125,6 @@ def test_suite():
def load_tests(loader, tests, pattern):
return test_suite()
+
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
diff --git a/src/isodate/tests/test_datetime.py b/src/isodate/tests/test_datetime.py
index ddad5da..3cdfe42 100644
--- a/src/isodate/tests/test_datetime.py
+++ b/src/isodate/tests/test_datetime.py
@@ -142,5 +142,6 @@ def test_suite():
def load_tests(loader, tests, pattern):
return test_suite()
+
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
diff --git a/src/isodate/tests/test_duration.py b/src/isodate/tests/test_duration.py
index 0b80a54..c03ae74 100644
--- a/src/isodate/tests/test_duration.py
+++ b/src/isodate/tests/test_duration.py
@@ -597,5 +597,6 @@ def test_suite():
def load_tests(loader, tests, pattern):
return test_suite()
+
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
diff --git a/src/isodate/tests/test_pickle.py b/src/isodate/tests/test_pickle.py
index f4edda6..46bf34d 100644
--- a/src/isodate/tests/test_pickle.py
+++ b/src/isodate/tests/test_pickle.py
@@ -2,7 +2,7 @@ try:
import cPickle as pickle
except ImportError:
import pickle
-import unittest
+import unittest
import isodate
@@ -53,5 +53,6 @@ def test_suite():
def load_tests(loader, tests, pattern):
return test_suite()
+
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
diff --git a/src/isodate/tests/test_strf.py b/src/isodate/tests/test_strf.py
index 37a135b..1aa76c7 100644
--- a/src/isodate/tests/test_strf.py
+++ b/src/isodate/tests/test_strf.py
@@ -131,5 +131,6 @@ def test_suite():
def load_tests(loader, tests, pattern):
return test_suite()
+
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
diff --git a/src/isodate/tests/test_time.py b/src/isodate/tests/test_time.py
index cc5ec08..7dfd0c0 100644
--- a/src/isodate/tests/test_time.py
+++ b/src/isodate/tests/test_time.py
@@ -139,5 +139,6 @@ def test_suite():
def load_tests(loader, tests, pattern):
return test_suite()
+
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
diff --git a/src/isodate/tzinfo.py b/src/isodate/tzinfo.py
index b41f058..83b241c 100644
--- a/src/isodate/tzinfo.py
+++ b/src/isodate/tzinfo.py
@@ -36,6 +36,7 @@ class Utc(tzinfo):
'''
return ZERO
+
UTC = Utc()
# the default instance for UTC.
@@ -138,5 +139,6 @@ class LocalTimezone(tzinfo):
tt = time.localtime(stamp)
return tt.tm_isdst > 0
+
LOCAL = LocalTimezone()
# the default instance for local time zone.