Skip to content

Commit

Permalink
Merge pull request #1706 from rimey/utc_tests
Browse files Browse the repository at this point in the history
Allow unit tests to pass if pytz is installed.
  • Loading branch information
tseaver committed Apr 8, 2016
2 parents 188515f + 967e939 commit 3cf7d03
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gcloud/test__helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ def _makeOne(self):

def test_module_property(self):
from gcloud import _helpers as MUT

klass = self._getTargetClass()
self.assertTrue(isinstance(MUT.UTC, klass))
try:
import pytz
except ImportError: # pragma: NO COVER
self.assertTrue(isinstance(MUT.UTC, klass))
else:
self.assertIs(MUT.UTC, pytz.UTC) # pragma: NO COVER

def test_dst(self):
import datetime
Expand Down

0 comments on commit 3cf7d03

Please sign in to comment.