• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SwissDataScienceCenter / renku-python / 5948296099

23 Aug 2023 07:23AM UTC coverage: 85.801% (+0.04%) from 85.766%
5948296099

Pull #3601

github-actions

olevski
chore: run poetry lock
Pull Request #3601: hotfix: v2.6.1

40 of 48 new or added lines in 10 files covered. (83.33%)

285 existing lines in 25 files now uncovered.

25875 of 30157 relevant lines covered (85.8%)

4.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.21
/conftest.py
1
# Copyright Swiss Data Science Center (SDSC). A partnership between
2
# École Polytechnique Fédérale de Lausanne (EPFL) and
3
# Eidgenössische Technische Hochschule Zürich (ETHZ).
4
#
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
# you may not use this file except in compliance with the License.
7
# You may obtain a copy of the License at
8
#
9
#     http://www.apache.org/licenses/LICENSE-2.0
10
#
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
16
"""Pytest configuration."""
7✔
17
import importlib
7✔
18
import os
7✔
19

20
CLI_FIXTURE_LOCATIONS = [
7✔
21
    "tests.cli.fixtures.cli_gateway",
22
    "tests.cli.fixtures.cli_integration_datasets",
23
    "tests.cli.fixtures.cli_kg",
24
    "tests.cli.fixtures.cli_old_projects",
25
    "tests.cli.fixtures.cli_projects",
26
    "tests.cli.fixtures.cli_providers",
27
    "tests.cli.fixtures.cli_runner",
28
    "tests.cli.fixtures.cli_workflow",
29
]
30

31
CORE_FIXTURE_LOCATIONS = [
7✔
32
    "tests.core.fixtures.core_database",
33
    "tests.core.fixtures.core_datasets",
34
    "tests.core.fixtures.core_models",
35
    "tests.core.fixtures.core_plugins",
36
    "tests.core.fixtures.core_projects",
37
    "tests.core.fixtures.core_serialization",
38
    "tests.core.fixtures.core_workflow",
39
]
40

41
GLOBAL_FIXTURE_LOCATIONS = [
7✔
42
    "tests.fixtures.common",
43
    "tests.fixtures.communication",
44
    "tests.fixtures.config",
45
    "tests.fixtures.domain_models",
46
    "tests.fixtures.repository",
47
    "tests.fixtures.runners",
48
    "tests.fixtures.session",
49
    "tests.fixtures.templates",
50
]
51

52
SERVICE_FIXTURE_LOCATIONS = [
7✔
53
    "tests.service.fixtures.service_cache",
54
    "tests.service.fixtures.service_client",
55
    "tests.service.fixtures.service_controllers",
56
    "tests.service.fixtures.service_data",
57
    "tests.service.fixtures.service_endpoints",
58
    "tests.service.fixtures.service_integration",
59
    "tests.service.fixtures.service_jobs",
60
    "tests.service.fixtures.service_projects",
61
    "tests.service.fixtures.service_scheduler",
62
]
63

64
INCLUDE_FIXTURES = GLOBAL_FIXTURE_LOCATIONS + CORE_FIXTURE_LOCATIONS + CLI_FIXTURE_LOCATIONS + SERVICE_FIXTURE_LOCATIONS
7✔
65

66

67
def pytest_configure(config):
7✔
68
    """Run global setup before executing tests."""
69

70
    for _fixture in INCLUDE_FIXTURES:
7✔
71
        module = importlib.import_module(_fixture)
7✔
72
        globals().update(
7✔
73
            {n: getattr(module, n) for n in module.__all__}
74
            if hasattr(module, "__all__")
75
            else {k: v for (k, v) in module.__dict__.items() if not k.startswith("_")}
76
        )
77

78
    os.environ["RENKU_SKIP_MIN_VERSION_CHECK"] = "1"
7✔
79
    os.environ["RENKU_DISABLE_VERSION_CHECK"] = "1"
7✔
80
    # NOTE: Set an env var during during tests to mark that Renku is running in a test session.
81
    os.environ["RENKU_RUNNING_UNDER_TEST"] = "1"
7✔
82

83

84
def pytest_unconfigure(config):
7✔
85
    """Hook that is called by pytest after all tests are executed."""
86
    os.environ.pop("RENKU_SKIP_MIN_VERSION_CHECK", None)
×
87
    os.environ.pop("RENKU_DISABLE_VERSION_CHECK", None)
×
UNCOV
88
    os.environ.pop("RENKU_RUNNING_UNDER_TEST", None)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc