summaryrefslogtreecommitdiff
path: root/test/unittest_modutils.py
diff options
context:
space:
mode:
authorDenis Laxalde <denis.laxalde@logilab.fr>2016-11-18 12:03:21 +0100
committerDenis Laxalde <denis.laxalde@logilab.fr>2016-11-18 12:03:21 +0100
commitd4f18655e76a87ec49b31787e09f42fb8d6cf5b5 (patch)
treef0288c03b99498819f9de8728dd34a550f6436dc /test/unittest_modutils.py
parentbed2c89730c6459f87ab4182e93748a23f05aa3d (diff)
downloadlogilab-common-d4f18655e76a87ec49b31787e09f42fb8d6cf5b5.tar.gz
[test] Do not use "modutils" in test_site_packages
Because "modutils" module may also be found in source directory, this test may fail under some circumstances (like Debian package build, for instance).
Diffstat (limited to 'test/unittest_modutils.py')
-rw-r--r--test/unittest_modutils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unittest_modutils.py b/test/unittest_modutils.py
index 384f582..d1fcaf9 100644
--- a/test/unittest_modutils.py
+++ b/test/unittest_modutils.py
@@ -145,8 +145,9 @@ class file_from_modpath_tc(ModutilsTestCase):
if it exists"""
def test_site_packages(self):
- self.assertEqual(path.realpath(modutils.file_from_modpath(['logilab', 'common', 'modutils'])),
- path.realpath(modutils.__file__.replace('.pyc', '.py')))
+ from pytz import tzinfo
+ self.assertEqual(path.realpath(modutils.file_from_modpath(['pytz', 'tzinfo'])),
+ path.realpath(tzinfo.__file__.replace('.pyc', '.py')))
def test_std_lib(self):
from os import path