From d24281901d0571bca09cde2b72ac8f9305ca2a50 Mon Sep 17 00:00:00 2001 From: cis-kuldeep Date: Mon, 12 Jul 2021 17:58:32 +0530 Subject: [PATCH] fixes for py2 --- src/tests/test_process.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tests/test_process.py b/src/tests/test_process.py index efe4adcb..8e064d00 100644 --- a/src/tests/test_process.py +++ b/src/tests/test_process.py @@ -9,11 +9,11 @@ import sys import tempfile import time import unittest - import psutil from .common import cleanup, put_signal_file +PY3 = sys.version_info[0] >= 3 class TestProcessProto(unittest.TestCase): """Test case implementing common logic for external testing: @@ -191,7 +191,10 @@ class TestProcess(TestProcessProto): """A test case for pybitmessage process""" def test_process_name(self): """Check PyBitmessage process name""" - self.assertEqual(self.process.name(), 'pybitmessage') + if PY3: + self.assertEqual(self.process.name(), 'pybitmessage') + else: + self.assertEqual(self.process.name(), 'PyBitmessage') @unittest.skipIf(psutil.version_info < (4, 0), 'psutil is too old') def test_home(self):