This looks great -- I'm glad my idea was workable. I have one more suggestion: ...
11 years, 4 months ago
(2013-11-14 18:32:14 UTC)
#1
This looks great -- I'm glad my idea was workable.
I have one more suggestion: instead of giving each decorated function five extra
arguments (m_waitpid, m_WIFEXITED etc.), why not give them a single argument
that is a namedtuple containing the mocks? The signatures become much simpler.
The asserts would become self.assertFalse(m.WTERMSIG.called) etc.
Alternatively, you could do it without any mocking arguments, and just make
those m_* variables attributes of self. So the asserts would become
self.assertFalse(self.m_WIFEXITED.called) etc.
Issue 26480043: remove global state in ChildWatcher tests
(Closed)
Created 11 years, 4 months ago by ayba
Modified 11 years, 4 months ago
Reviewers: GvR
Base URL:
Comments: 0