summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-05-08 08:16:02 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-05-08 08:16:02 (GMT)
commit6bcc0f1b5161adf0773ebeba77f1d7662aad4f0e (patch)
tree9ae7d2e2c4a943de43b334d0d094bab89a698f9c /Lib/test/test_email
parentbabc8227cc842287cf701674f2807c392b7a6350 (diff)
downloadcpython-6bcc0f1b5161adf0773ebeba77f1d7662aad4f0e.zip
cpython-6bcc0f1b5161adf0773ebeba77f1d7662aad4f0e.tar.gz
cpython-6bcc0f1b5161adf0773ebeba77f1d7662aad4f0e.tar.bz2
#17877: skip test if the Olson's TZ database is missing.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r--Lib/test/test_email/test_utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_utils.py b/Lib/test/test_email/test_utils.py
index 622ef3a..e507dd2 100644
--- a/Lib/test/test_email/test_utils.py
+++ b/Lib/test/test_email/test_utils.py
@@ -4,6 +4,7 @@ import test.support
import time
import unittest
import sys
+import os.path
class DateTimeTests(unittest.TestCase):
@@ -123,6 +124,9 @@ class LocaltimeTests(unittest.TestCase):
# XXX: Need a more robust test for Olson's tzdata
@unittest.skipIf(sys.platform.startswith('win'),
"Windows does not use Olson's TZ database")
+ @unittest.skipUnless(os.path.exists('/usr/share/zoneinfo') or
+ os.path.exists('/usr/lib/zoneinfo'),
+ "Can't find the Olson's TZ database")
@test.support.run_with_tz('Europe/Kiev')
def test_variable_tzname(self):
t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc)