Skip to content

Commit

Permalink
No __init__.py contents are needed
Browse files Browse the repository at this point in the history
  • Loading branch information
juditnovak committed Jun 13, 2023
1 parent 903f8f3 commit 7704604
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 30 deletions.
27 changes: 0 additions & 27 deletions tests/__init__.py
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}/*")
2 changes: 1 addition & 1 deletion tests/unittest/test_argument_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import unittest
from argparse import ArgumentParser
from unittest import TestCase

from spark8t.cli.params import (
add_config_arguments,
Expand All @@ -12,7 +13,6 @@
spark_user_parser,
)
from spark8t.cli.service_account_registry import create_service_account_registry_parser
from tests import TestCase


class TestArgumentParsingPySpark(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/unittest/test_domain.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import logging
import unittest
import uuid
from unittest import TestCase

from spark8t.domain import Defaults, PropertyFile, ServiceAccount
from spark8t.services import InMemoryAccountRegistry
from spark8t.utils import umask_named_temporary_file
from tests import TestCase


class TestDomain(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/unittest/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import unittest
import uuid
from unittest import TestCase
from unittest.mock import patch

import yaml
Expand All @@ -22,7 +23,6 @@
LightKube,
parse_conf_overrides,
)
from tests import TestCase


class TestServices(TestCase):
Expand Down

0 comments on commit 7704604

Please sign in to comment.