From 8ed1d48799e8176c0dbe6b2f234dd4948f0d54db Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Thu, 26 Sep 2019 16:54:59 +0530 Subject: [PATCH 1/3] core pylint fixes --- src/tests/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/core.py b/src/tests/core.py index 005900d0..b01c6b69 100644 --- a/src/tests/core.py +++ b/src/tests/core.py @@ -25,6 +25,7 @@ program = None def pickle_knownnodes(): + """Generate old style pickled knownnodes.dat""" now = time.time() with open(knownnodes_file, 'wb') as dst: pickle.dump({ @@ -40,6 +41,7 @@ def pickle_knownnodes(): def cleanup(): + """Cleanup application files""" os.remove(knownnodes_file) From 7839f83f20a2e887a9b68bd4da099ba966b02972 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Thu, 26 Sep 2019 16:56:55 +0530 Subject: [PATCH 2/3] test_api pylint fixes --- src/tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/test_api.py b/src/tests/test_api.py index dfe1b273..44505ffe 100644 --- a/src/tests/test_api.py +++ b/src/tests/test_api.py @@ -31,7 +31,7 @@ class TestAPIShutdown(TestAPIProto, TestProcessShutdown): """Separate test case for API command 'shutdown'""" def test_shutdown(self): """Shutdown the pybitmessage""" - self.assertEquals(self.api.shutdown(), 'done') + self.assertEqual(self.api.shutdown(), 'done') for _ in range(5): if not self.process.is_running(): break From 944c30f9b41fc3b557821edc5a0990bb4e22f008 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Thu, 26 Sep 2019 16:57:17 +0530 Subject: [PATCH 3/3] test_config pylint fixes --- src/tests/test_config.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tests/test_config.py b/src/tests/test_config.py index a0a727e5..35ddd3fa 100644 --- a/src/tests/test_config.py +++ b/src/tests/test_config.py @@ -26,6 +26,7 @@ class TestConfig(unittest.TestCase): False ) # no arg for default + # pylint: disable=too-many-function-args with self.assertRaises(TypeError): BMConfigParser().safeGetBoolean( 'nonexistent', 'nonexistent', True) @@ -47,9 +48,9 @@ class TestProcessConfig(TestProcessProto): config = BMConfigParser() config.read(os.path.join(self.home, 'keys.dat')) - self.assertEquals(config.safeGetInt( + self.assertEqual(config.safeGetInt( 'bitmessagesettings', 'settingsversion'), 10) - self.assertEquals(config.safeGetInt( + self.assertEqual(config.safeGetInt( 'bitmessagesettings', 'port'), 8444) # don't connect self.assertTrue(config.safeGetBoolean( @@ -59,7 +60,7 @@ class TestProcessConfig(TestProcessProto): 'bitmessagesettings', 'apienabled')) # extralowdifficulty is false - self.assertEquals(config.safeGetInt( + self.assertEqual(config.safeGetInt( 'bitmessagesettings', 'defaultnoncetrialsperbyte'), 1000) - self.assertEquals(config.safeGetInt( + self.assertEqual(config.safeGetInt( 'bitmessagesettings', 'defaultpayloadlengthextrabytes'), 1000)