Skip to content

Commit 3cf7d03

Browse files
committed
Merge pull request #1706 from rimey/utc_tests
Allow unit tests to pass if pytz is installed.
2 parents 188515f + 967e939 commit 3cf7d03

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

gcloud/test__helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ def _makeOne(self):
5454

5555
def test_module_property(self):
5656
from gcloud import _helpers as MUT
57-
5857
klass = self._getTargetClass()
59-
self.assertTrue(isinstance(MUT.UTC, klass))
58+
try:
59+
import pytz
60+
except ImportError: # pragma: NO COVER
61+
self.assertTrue(isinstance(MUT.UTC, klass))
62+
else:
63+
self.assertIs(MUT.UTC, pytz.UTC) # pragma: NO COVER
6064

6165
def test_dst(self):
6266
import datetime

0 commit comments

Comments
 (0)