Nir Soffer has uploaded a new change for review.
Change subject: procwatch: There is no need for _private helpers
......................................................................
procwatch: There is no need for _private helpers
In the context of tests classes, there is not need for private helpers.
The only caller is the test framework, and it calls only the test
functions.
Change-Id: I54c7acf9c599716527ae3b4919fc19bdbe7de5c1
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/procwatch_test.py
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/65074/1
diff --git a/tests/procwatch_test.py b/tests/procwatch_test.py
index 8ed9d9f..1c6b365 100644
--- a/tests/procwatch_test.py
+++ b/tests/procwatch_test.py
@@ -35,7 +35,7 @@
def assertUnexpectedCall(self, data):
raise AssertionError("Unexpected data: %r" % data)
- def _startCommand(self, command):
+ def startCommand(self, command):
return compat.CPopen(command)
@permutations([
@@ -53,7 +53,7 @@
cmd[-1] = cmd[-1] % text
- c = self._startCommand(cmd)
+ c = self.startCommand(cmd)
watcher = procwatch.ProcessWatcher(
c,
recv_data if recv_out else self.assertUnexpectedCall,
@@ -80,7 +80,7 @@
# defined in the parent function.
operator.iadd(received, buffer)
- c = self._startCommand(cmd)
+ c = self.startCommand(cmd)
watcher = procwatch.ProcessWatcher(
c,
recv_data if recv_out else self.assertUnexpectedCall,
@@ -99,7 +99,7 @@
self.assertEqual(text, str(received))
def test_timeout(self):
- c = self._startCommand(["sleep", "5"])
+ c = self.startCommand(["sleep", "5"])
watcher = procwatch.ProcessWatcher(c, self.assertUnexpectedCall,
self.assertUnexpectedCall)
@@ -117,7 +117,7 @@
('terminate', -signal.SIGTERM),
))
def test_signals(self, method, expected_retcode):
- c = self._startCommand(["sleep", "2"])
+ c = self.startCommand(["sleep", "2"])
watcher = procwatch.ProcessWatcher(c, self.assertUnexpectedCall,
self.assertUnexpectedCall)
--
To view, visit
https://gerrit.ovirt.org/65074
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54c7acf9c599716527ae3b4919fc19bdbe7de5c1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>