Index: tests/subprocess2_test.py |
diff --git a/tests/subprocess2_test.py b/tests/subprocess2_test.py |
index 9d30452c3118220135168a934e52d407c0305a3f..54e4e15124ceed59d7622869aa379a52679e50ef 100755 |
--- a/tests/subprocess2_test.py |
+++ b/tests/subprocess2_test.py |
@@ -11,14 +11,10 @@ import sys |
import time |
import unittest |
-ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
-sys.path.insert(0, ROOT_DIR) |
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
import subprocess2 |
-# Method could be a function |
-# pylint: disable=R0201 |
- |
class Subprocess2Test(unittest.TestCase): |
# Can be mocked in a test. |
TO_SAVE = { |
@@ -62,7 +58,8 @@ class Subprocess2Test(unittest.TestCase): |
assert not results |
results.update(kwargs) |
results['args'] = args |
- def communicate(self): |
+ @staticmethod |
+ def communicate(): |
return None, None |
subprocess2.Popen = fake_Popen |
return results |
@@ -76,7 +73,8 @@ class Subprocess2Test(unittest.TestCase): |
assert not results |
results.update(kwargs) |
results['args'] = args |
- def communicate(self): |
+ @staticmethod |
+ def communicate(): |
return None, None |
subprocess2.subprocess.Popen = fake_Popen |
return results |