summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2013-05-07 14:42:37 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2013-05-07 14:42:37 +0200
commit259fac24fdc0b990678be0748528b8b302e2058e (patch)
tree495afed48eeda0418986d6ff1d4026ef6201420b
parentf8e39f91ad757f79cd4f83d481fabf627699f78f (diff)
downloadlogilab-common-259fac24fdc0b990678be0748528b8b302e2058e.tar.gz
[modutils test] enhance some test names
-rw-r--r--test/unittest_modutils.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/unittest_modutils.py b/test/unittest_modutils.py
index 3e9a74a..dfbcf14 100644
--- a/test/unittest_modutils.py
+++ b/test/unittest_modutils.py
@@ -1,4 +1,4 @@
-# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
@@ -143,16 +143,16 @@ class file_from_modpath_tc(ModutilsTestCase):
corresponding file, giving priority to source file over precompiled file
if it exists"""
- def test_knownValues_file_from_modpath_1(self):
+ def test_site_packages(self):
self.assertEqual(path.realpath(modutils.file_from_modpath(['logilab', 'common', 'modutils'])),
path.realpath(modutils.__file__.replace('.pyc', '.py')))
- def test_knownValues_file_from_modpath_2(self):
+ def test_std_lib(self):
from os import path
self.assertEqual(path.realpath(modutils.file_from_modpath(['os', 'path']).replace('.pyc', '.py')),
path.realpath(path.__file__.replace('.pyc', '.py')))
- def test_knownValues_file_from_modpath_3(self):
+ def test_xmlplus(self):
try:
# don't fail if pyxml isn't installed
from xml.dom import ext
@@ -162,13 +162,15 @@ class file_from_modpath_tc(ModutilsTestCase):
self.assertEqual(path.realpath(modutils.file_from_modpath(['xml', 'dom', 'ext']).replace('.pyc', '.py')),
path.realpath(ext.__file__.replace('.pyc', '.py')))
- def test_knownValues_file_from_modpath_4(self):
+ def test_builtin(self):
self.assertEqual(modutils.file_from_modpath(['sys']),
None)
- def test_raise_file_from_modpath_Exception(self):
+
+ def test_unexisting(self):
self.assertRaises(ImportError, modutils.file_from_modpath, ['turlututu'])
+
class get_source_file_tc(ModutilsTestCase):
def test(self):