We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b19a262 commit 0254d88Copy full SHA for 0254d88
test/sample_cases_test.py
@@ -1,25 +1,13 @@
1
-import subprocess
2
-import os
3
-import sys
+#!/usr/bin/env python3
+
4
from pathlib import Path
5
-import time
+import subprocess
6
import unittest
7
+__author__ = "Lorena Mesa"
8
+__email__ = "[email protected]"
9
10
PROJECT_ROOT = Path(__file__).parent.parent.absolute()
-
11
-from contextlib import contextmanager
12
13
14
-@contextmanager
15
-def redirect_stdout(new_out):
16
- # https://stackoverflow.com/questions/47066063/how-to-capture-python-subprocess-stdout-in-unittest
17
- old_stdout = os.dup(1)
18
- try:
19
- os.dup2(new_out, sys.stdout.fileno())
20
- yield
21
- finally:
22
- os.dup2(old_stdout, 1)
23
24
25
class TestHappyPath(unittest.TestCase):
0 commit comments