From 9d83be3647547cfca4e129cfeb63771213232cf7 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Mon, 26 Sep 2016 18:22:22 +0200 Subject: Remove unused variables in tests This commit removes or marks unused variables as "expected to be unused" by using '_' prefix. Reviewed-By: Florence Blanc-Renaud Reviewed-By: Stanislav Laznicka --- ipatests/test_ipapython/test_cookie.py | 4 ++-- ipatests/test_ipapython/test_dn.py | 2 +- ipatests/test_ipapython/test_ipautil.py | 1 - ipatests/test_ipapython/test_keyring.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'ipatests/test_ipapython') diff --git a/ipatests/test_ipapython/test_cookie.py b/ipatests/test_ipapython/test_cookie.py index 6af447984..57233b7b0 100644 --- a/ipatests/test_ipapython/test_cookie.py +++ b/ipatests/test_ipapython/test_cookie.py @@ -279,7 +279,7 @@ class TestInvalidAttributes(unittest.TestCase): # Invalid Max-Age s = 'color=blue; Max-Age=over-the-hill' with self.assertRaises(ValueError): - cookies = Cookie.parse(s) + Cookie.parse(s) cookie = Cookie('color', 'blue') with self.assertRaises(ValueError): @@ -288,7 +288,7 @@ class TestInvalidAttributes(unittest.TestCase): # Invalid Expires s = 'color=blue; Expires=Sun, 06 Xxx 1994 08:49:37 GMT' with self.assertRaises(ValueError): - cookies = Cookie.parse(s) + Cookie.parse(s) cookie = Cookie('color', 'blue') with self.assertRaises(ValueError): diff --git a/ipatests/test_ipapython/test_dn.py b/ipatests/test_ipapython/test_dn.py index e09186f85..a96bd33c5 100644 --- a/ipatests/test_ipapython/test_dn.py +++ b/ipatests/test_ipapython/test_dn.py @@ -933,7 +933,7 @@ class TestDN(unittest.TestCase): dn3[1.0] # pylint: disable=pointless-statement def test_assignments(self): - dn = dn2 = DN('t=0,t=1,t=2,t=3,t=4,t=5,t=6,t=7,t=8,t=9') + dn = DN('t=0,t=1,t=2,t=3,t=4,t=5,t=6,t=7,t=8,t=9') with self.assertRaises(TypeError): dn[0] = RDN('t=a') with self.assertRaises(TypeError): diff --git a/ipatests/test_ipapython/test_ipautil.py b/ipatests/test_ipapython/test_ipautil.py index d0a68dfa3..6427935b1 100644 --- a/ipatests/test_ipapython/test_ipautil.py +++ b/ipatests/test_ipapython/test_ipautil.py @@ -183,7 +183,6 @@ class TestCIDict(object): self.cidict.keys(), self.cidict.values())) def test_iter(self): - items = [] assert list(self.cidict) == list(self.cidict.keys()) assert sorted(self.cidict) == sorted(['Key1', 'key2', 'KEY3']) diff --git a/ipatests/test_ipapython/test_keyring.py b/ipatests/test_ipapython/test_keyring.py index c81e6d95f..cd3d1f19b 100644 --- a/ipatests/test_ipapython/test_keyring.py +++ b/ipatests/test_ipapython/test_keyring.py @@ -111,7 +111,7 @@ class test_keyring(object): """ Read a non-existent key """ - result = kernel_keyring.read_key(TEST_KEY) + kernel_keyring.read_key(TEST_KEY) def test_06(self): """ -- cgit