Skip to content

Commit 284a20d

Browse files
committed
fix test
1 parent 4ee8e0c commit 284a20d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_python.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ def communicate(self, timeout=None):
2626

2727
def kill(self):
2828
pass
29+
30+
def __enter__(self):
31+
return self
32+
33+
def __exit__(self, exc_type, exc_val, exc_tb):
34+
self.kill()
2935

3036
c = FakeObj(version_output.split()[0])
3137
return c
@@ -76,6 +82,12 @@ def communicate(self, timeout=None):
7682

7783
def kill(self):
7884
pass
85+
86+
def __enter__(self):
87+
return self
88+
89+
def __exit__(self, exc_type, exc_val, exc_tb):
90+
self.kill()
7991

8092
c = FakeObj(".".join([str(i) for i in version_output.split()[0].split(".")]))
8193
return c

0 commit comments

Comments
 (0)