Skip to content

Rename test modules to not collide #1639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,13 @@ pylint:
uv run -m pylint --errors-only .

unit:
uv run -m pytest --verbose --color=yes artcommon/tests/
uv run -m pytest --verbose --color=yes doozer/tests/
uv run -m pytest --verbose --color=yes elliott/tests/
uv run -m pytest --verbose --color=yes pyartcd/tests/
uv run -m pytest --verbose --color=yes ocp-build-data-validator/tests/
uv run -m pytest --verbose --color=yes .

functional-elliott:
uv run -m pytest --verbose --color=yes elliott/functional_tests/
uv run -m pytest --verbose --color=yes elliott/tests_functional_elliott/

functional-doozer:
uv run -m pytest --verbose --color=yes doozer/tests_functional
uv run -m pytest --verbose --color=yes doozer/tests_functional_doozer/

test: lint unit

Expand Down
4 changes: 2 additions & 2 deletions doozer/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
long_description=open('README.md').read(),
url="https://github.com/openshift-eng/art-tools/tree/main/doozer",
license="Apache License, Version 2.0",
packages=find_packages(exclude=["tests", "tests.*", "tests_functional", "tests_functional.*"]),
packages=find_packages(exclude=["tests.*"]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be

Suggested change
packages=find_packages(exclude=["tests.*"]),
packages=find_packages(exclude=["tests_doozer", "tests_doozer.*", "tests_functional_doozer", "tests_functional_doozer.*"]),

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking we need similar changes for elliott and pyartcd.

include_package_data=True,
entry_points={
'console_scripts': [
'doozer = doozerlib.cli.__main__:main',
],
},
install_requires=INSTALL_REQUIRES,
test_suite='tests',
test_suite='tests_doozer',
dependency_links=[],
python_requires='>=3.8',
classifiers=[
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from dockerfile_parse import DockerfileParser

from tests_functional import DoozerRunnerTestCase
from tests_functional_doozer import DoozerRunnerTestCase


class TestBasicRebase(DoozerRunnerTestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from dockerfile_parse import DockerfileParser

from tests_functional import DoozerRunnerTestCase
from tests_functional_doozer import DoozerRunnerTestCase


class TestGoLangRebase(DoozerRunnerTestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from doozerlib import brew

from tests_functional import DoozerRunnerTestCase
from tests_functional_doozer import DoozerRunnerTestCase


class TestKojiWrapper(DoozerRunnerTestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from doozerlib import metadata
from mock import MagicMock

from tests_functional import DoozerRunnerTestCase
from tests_functional_doozer import DoozerRunnerTestCase


class TestMetadata(DoozerRunnerTestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from artcommonlib import exectools

from tests_functional import DoozerRunnerTestCase
from tests_functional_doozer import DoozerRunnerTestCase


class TestSanity(DoozerRunnerTestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yaml

from tests_functional import DoozerRunnerTestCase
from tests_functional_doozer import DoozerRunnerTestCase


class TestScanSources(DoozerRunnerTestCase):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from flexmock import flexmock
from tenacity import wait_none

from tests import test_structures
from tests_elliott import test_structures


class TestBrew(unittest.TestCase):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from elliottlib import brew, constants, errata, exceptions
from flexmock import flexmock

from tests import test_structures
from tests_elliott import test_structures

unshipped_builds = [
Mock(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants

# this test may break for EOL releases - apparently the CDN repos for
# some images may become undefined after the fact.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class FindBugsSweepTestCase(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class ChangeStateTestCase(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class GreateTestCase(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class FindBugsBlockerTestCase(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class FindBugsQETestCase(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class FindBugsSweepTestCase(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants

# This test may start failing once this version is EOL and we either change the
# ocp-build-data bugzilla schema or all of the non-shipped builds are garbage-collected.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class GetTestCase(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from doozerlib.backend.konflux_client import API_VERSION, KIND_SNAPSHOT

from functional_tests import constants
from tests_functional_elliott import constants


class ReleaseTestCases(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from doozerlib.backend.konflux_client import API_VERSION, KIND_SNAPSHOT

from functional_tests import constants
from tests_functional_elliott import constants


class SnapshotTestCases(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class VerifyBugs(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from elliottlib.cli import verify_attached_operators_cli
from elliottlib.runtime import Runtime

from functional_tests import constants
from tests_functional_elliott import constants


class TestVerifyAttachedOperators(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import unittest

from functional_tests import constants
from tests_functional_elliott import constants


class VerifyPayloadTestCase(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions pyartcd/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
description="Python based pipeline library for managing and automating Red Hat OpenShift Container Platform releases",
url="https://github.com/openshift-eng/art-tools/tree/main/pyartcd",
license="Apache License, Version 2.0",
packages=find_packages(exclude=["tests", "tests.*"]),
packages=find_packages(exclude=["tests.*"]),
include_package_data=True,
install_requires=INSTALL_REQUIRES,
entry_points={
'console_scripts': [
'artcd = pyartcd.__main__:main',
],
},
test_suite='tests',
test_suite='tests_pyartcd',
dependency_links=[],
python_requires='>=3.8',
classifiers=[
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
norecursedirs = .git .venv doozer/tests_functional_doozer elliott/tests_functional_elliott
Loading