Skip to content

Commit dd49138

Browse files
committed
Fix edge case when output cannot not be caught in tests
1 parent 7976a59 commit dd49138

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: webware/Tests/TestEndToEnd/AppTest.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def tearDownClass(cls):
7474
+ output)
7575

7676
def setUp(self):
77+
self.output = ''
7778
self.stdout, self.stderr = sys.stdout, sys.stderr
7879
if self.catchOutput:
7980
sys.stdout = sys.stderr = StringIO()
@@ -82,8 +83,6 @@ def tearDown(self):
8283
if self.catchOutput:
8384
self.output = sys.stdout.getvalue().rstrip()
8485
sys.stdout, sys.stderr = self.stdout, self.stderr
85-
else:
86-
self.output = ''
8786

8887
def run(self, result=None):
8988
result = super().run(result) # pylint: disable=no-member

0 commit comments

Comments
 (0)