Skip to content

Commit 61287a5

Browse files
author
Michael Barr
committed
Multiple updates trying to resolve coverage issues.
1 parent 36b4135 commit 61287a5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ install:
1919
- travis_retry pip install $DJANGO
2020
- travis_retry pip install pytz
2121
- travis_retry pip install coveralls
22+
- travis_retry pip install django-discover-runner
2223

2324
script:
2425
- coverage run --source=timezone_utils run_tests.py
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
from invalid import *
2-
from valid import *
1+
__author__ = 'michaelbarr'

tests/test_choices.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ class TimeZoneChoicesTestCase(TestCase):
2121
def test_TIMEZONE_OFFSET_REGEX(self):
2222
now = datetime.now(pytz.timezone('US/Eastern'))
2323
self.assertRegexpMatches(str(now.strftime('%z')), TIMEZONE_OFFSET_REGEX)
24-
self.assertNotRegexpMatches(
25-
'-' + str(now.strftime('%z')),
26-
TIMEZONE_OFFSET_REGEX
24+
self.assertEqual(
25+
TIMEZONE_OFFSET_REGEX.match('-' + str(now.strftime('%z'))),
26+
None
2727
)
28-
self.assertNotRegexpMatches(
29-
str(now.strftime('%z') + '1'),
30-
TIMEZONE_OFFSET_REGEX
28+
self.assertEqual(
29+
TIMEZONE_OFFSET_REGEX.match(str(now.strftime('%z') + '1')),
30+
None
3131
)
3232

3333
def test_ALL_TIMEZONES_CHOICES_length(self):

0 commit comments

Comments
 (0)