-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
903f8f3
commit 7704604
Showing
4 changed files
with
3 additions
and
30 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,27 +0,0 @@ | ||
import os | ||
import random | ||
from unittest import TestCase, skipIf | ||
|
||
from spark8t.utils import create_dir_if_not_exists # type: ignore | ||
|
||
test_path = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
DATA_FOLDER = os.path.join(test_path, "resources", "data") | ||
|
||
integration_test_flag = bool(int(os.environ.get("IE_TEST", "0"))) | ||
integration_test = skipIf( | ||
integration_test_flag is False, | ||
"Integration test, to be skipped when running unittests", | ||
) | ||
|
||
|
||
class UnittestWithTmpFolder(TestCase): | ||
TMP_FOLDER = os.path.join("/tmp", "%032x" % random.getrandbits(128)) | ||
|
||
@classmethod | ||
def setUpClass(cls) -> None: | ||
create_dir_if_not_exists(cls.TMP_FOLDER) | ||
|
||
@classmethod | ||
def tearDownClass(cls) -> None: | ||
os.system(f"rm -rf {cls.TMP_FOLDER}/*") | ||
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
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
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