-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add meta data to sample cases test file
- Loading branch information
Lorena Mesa
committed
Jul 17, 2024
1 parent
b19a262
commit 0254d88
Showing
1 changed file
with
5 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
import subprocess | ||
import os | ||
import sys | ||
#!/usr/bin/env python3 | ||
|
||
from pathlib import Path | ||
import time | ||
import subprocess | ||
import unittest | ||
|
||
__author__ = "Lorena Mesa" | ||
__email__ = "[email protected]" | ||
|
||
PROJECT_ROOT = Path(__file__).parent.parent.absolute() | ||
|
||
from contextlib import contextmanager | ||
|
||
|
||
@contextmanager | ||
def redirect_stdout(new_out): | ||
# https://stackoverflow.com/questions/47066063/how-to-capture-python-subprocess-stdout-in-unittest | ||
old_stdout = os.dup(1) | ||
try: | ||
os.dup2(new_out, sys.stdout.fileno()) | ||
yield | ||
finally: | ||
os.dup2(old_stdout, 1) | ||
|
||
|
||
class TestHappyPath(unittest.TestCase): | ||
|