summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLaurent Peuch <cortex@worlddomination.be>2020-04-22 22:43:05 +0200
committerLaurent Peuch <cortex@worlddomination.be>2020-04-22 22:43:05 +0200
commite049c82dafddb0a3b2ae4aaebb12974424feb6de (patch)
tree067ad45528a1689e96c297614b639b8202e5d481 /test
parent81aa933d7c0a55c455d03112578fb5f67bbdda7c (diff)
downloadlogilab-common-e049c82dafddb0a3b2ae4aaebb12974424feb6de.tar.gz
[deprecation/refactoring] simplify deprecated
Diffstat (limited to 'test')
-rw-r--r--test/unittest_deprecation.py4
-rw-r--r--test/unittest_modutils.py2
-rw-r--r--test/unittest_registry.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/test/unittest_deprecation.py b/test/unittest_deprecation.py
index a348d67..09902a2 100644
--- a/test/unittest_deprecation.py
+++ b/test/unittest_deprecation.py
@@ -57,7 +57,7 @@ class RawInputTC(TestCase):
any_func = deprecation.deprecated('message')(self.mk_func())
any_func()
self.assertEqual(self.messages,
- ['The function "any_func" is deprecated', 'message'])
+ ['[logilab.common] The function "any_func" is deprecated', '[logilab.common] message'])
def test_deprecated_decorator(self):
@deprecation.deprecated()
@@ -69,7 +69,7 @@ class RawInputTC(TestCase):
pass
any_func()
self.assertEqual(self.messages,
- ['The function "any_func" is deprecated', 'message'])
+ ['[logilab.common] The function "any_func" is deprecated', '[logilab.common] message'])
def test_attribute_renamed(self):
@deprecation.attribute_renamed(old_name="old", new_name="new")
diff --git a/test/unittest_modutils.py b/test/unittest_modutils.py
index 7af241e..cd639e1 100644
--- a/test/unittest_modutils.py
+++ b/test/unittest_modutils.py
@@ -122,7 +122,7 @@ class modpath_from_file_tc(ModutilsTestCase):
with warnings.catch_warnings(record=True) as warns:
self.assertEqual(modutils.modpath_from_file(modutils.__file__),
['logilab', 'common', 'modutils'])
- self.assertIn('you should avoid using modpath_from_file()',
+ self.assertIn('[logilab.common] you should avoid using modpath_from_file()',
[str(w.message) for w in warns])
def test_knownValues_modpath_from_file_2(self):
diff --git a/test/unittest_registry.py b/test/unittest_registry.py
index 1c07e4c..2fdb21e 100644
--- a/test/unittest_registry.py
+++ b/test/unittest_registry.py
@@ -181,7 +181,7 @@ class RegistryStoreTC(TestCase):
with warnings.catch_warnings(record=True) as warns:
store.register_objects([self.datapath('regobjects.py'),
self.datapath('regobjects2.py')])
- self.assertIn('use register_modnames() instead',
+ self.assertIn('[logilab.common] use register_modnames() instead',
[str(w.message) for w in warns])
self.assertEqual(['zereg'], list(store.keys()))
self.assertEqual(set(('appobject1', 'appobject2', 'appobject3')),