summaryrefslogtreecommitdiff
path: root/test/test_modutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_modutils.py')
-rw-r--r--test/test_modutils.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/test_modutils.py b/test/test_modutils.py
index cd639e1..bcffe07 100644
--- a/test/test_modutils.py
+++ b/test/test_modutils.py
@@ -90,12 +90,15 @@ class get_module_part_tc(ModutilsTestCase):
"""given a dotted name return the module part of the name"""
def test_knownValues_get_module_part_1(self):
- self.assertEqual(modutils.get_module_part('logilab.common.modutils'),
- 'logilab.common.modutils')
+ self.assertEqual(
+ modutils.get_module_part("logilab.common.modutils"), "logilab.common.modutils"
+ )
def test_knownValues_get_module_part_2(self):
- self.assertEqual(modutils.get_module_part('logilab.common.modutils.get_module_part'),
- 'logilab.common.modutils')
+ self.assertEqual(
+ modutils.get_module_part("logilab.common.modutils.get_module_part"),
+ "logilab.common.modutils",
+ )
def test_knownValues_get_module_part_3(self):
"""relative import from given file"""
@@ -120,10 +123,13 @@ class modpath_from_file_tc(ModutilsTestCase):
def test_knownValues_modpath_from_file_1(self):
with warnings.catch_warnings(record=True) as warns:
- self.assertEqual(modutils.modpath_from_file(modutils.__file__),
- ['logilab', 'common', 'modutils'])
- self.assertIn('[logilab.common] you should avoid using modpath_from_file()',
- [str(w.message) for w in warns])
+ self.assertEqual(
+ modutils.modpath_from_file(modutils.__file__), ["logilab", "common", "modutils"]
+ )
+ self.assertIn(
+ "[logilab.common.modutils] you should avoid using modpath_from_file()",
+ [str(w.message) for w in warns],
+ )
def test_knownValues_modpath_from_file_2(self):
self.assertEqual(modutils.modpath_from_file('unittest_modutils.py',