[virt-tools-list] [virt-manager PATCH 1/2] pylint: Replace deprecated assertEquals with assertEqual
Chen Hanxiao
chen_han_xiao at 126.com
Sat Oct 21 06:49:59 UTC 2017
From: Chen Hanxiao <chenhanxiao at gmail.com>
pylint complain:
Using deprecated method assertEquals() (deprecated-method)
https://docs.python.org/3.3/library/unittest.html#deprecated-aliases
Method Name Deprecated alias Deprecated alias
assertEqual() failUnlessEqual assertEquals
Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
---
tests/hostkeymap.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/hostkeymap.py b/tests/hostkeymap.py
index ce5d0f64..8fd79f76 100644
--- a/tests/hostkeymap.py
+++ b/tests/hostkeymap.py
@@ -32,23 +32,23 @@ class TestHostkeymap(unittest.TestCase):
return open(os.path.join(os.getcwd(),
"tests/hostkeymap", filename))
- self.assertEquals(
+ self.assertEqual(
hostkeymap._sysconfig_keyboard(
_open("sysconfig-comments.txt")),
"")
- self.assertEquals(
+ self.assertEqual(
hostkeymap._sysconfig_keyboard(
_open("sysconfig-rhel5.txt")),
"us")
- self.assertEquals(
+ self.assertEqual(
hostkeymap._find_xkblayout(
_open("default-keyboard-debian9.txt")),
"us")
- self.assertEquals(
+ self.assertEqual(
hostkeymap._find_xkblayout(
_open("console-setup-debian9.txt")),
None)
- self.assertEquals(
+ self.assertEqual(
hostkeymap._xorg_keymap(
_open("xorg-rhel5.txt")),
"us")
--
2.13.5
More information about the virt-tools-list
mailing list