Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name="octue",
version="0.1.23", # Ensure all requirements files containing octue are updated, too (e.g. docs build).
version="0.1.24", # Ensure all requirements files containing octue are updated, too (e.g. docs build).
py_modules=["cli"],
install_requires=[
"click>=7.1.2",
Expand Down
7 changes: 0 additions & 7 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import os
import unittest

from octue.cloud.emulators import GoogleCloudStorageEmulatorTestResultModifier


TESTS_DIR = os.path.dirname(__file__)
TEST_PROJECT_NAME = os.environ["TEST_PROJECT_NAME"]
TEST_BUCKET_NAME = "octue-test-bucket"

test_result_modifier = GoogleCloudStorageEmulatorTestResultModifier(default_bucket_name=TEST_BUCKET_NAME)
setattr(unittest.TestResult, "startTestRun", test_result_modifier.startTestRun)
setattr(unittest.TestResult, "stopTestRun", test_result_modifier.stopTestRun)
6 changes: 6 additions & 0 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import uuid
from tempfile import TemporaryDirectory, gettempdir

from octue.cloud.emulators import GoogleCloudStorageEmulatorTestResultModifier
from octue.logging_handlers import apply_log_handler
from octue.mixins import MixinBase, Pathable
from octue.resources import Datafile, Dataset, Manifest
from tests import TEST_BUCKET_NAME


logger = logging.getLogger(__name__)
Expand All @@ -23,6 +25,10 @@ class BaseTestCase(unittest.TestCase):
- sets a path to the test data directory
"""

test_result_modifier = GoogleCloudStorageEmulatorTestResultModifier(default_bucket_name=TEST_BUCKET_NAME)
setattr(unittest.TestResult, "startTestRun", test_result_modifier.startTestRun)
setattr(unittest.TestResult, "stopTestRun", test_result_modifier.stopTestRun)

def setUp(self):
# Set up paths to the test data directory and to the app templates directory
root_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down