Skip to content

Move tests to directories that can be imported #1211

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

Merged
merged 1 commit into from
May 24, 2025
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: 0 additions & 2 deletions tests/integration/env-file-tests/.env

This file was deleted.

2 changes: 2 additions & 0 deletions tests/integration/env_file_tests/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ZZVAR1='This value is overwritten by env_file_tests/.env'
ZZVAR3='This value is loaded from env_file_tests/.env'
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def compose_base_path():
return os.path.join(test_path(), "env-file-tests")
return os.path.join(test_path(), "env_file_tests")


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


def compose_yaml_path():
return os.path.join(os.path.join(test_path(), "env-tests"), "container-compose.yml")
return os.path.join(os.path.join(test_path(), "env_tests"), "container-compose.yml")


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


def compose_yaml_path():
return os.path.join(os.path.join(test_path(), "exit-from"), "docker-compose.yaml")
return os.path.join(os.path.join(test_path(), "exit_from"), "docker-compose.yaml")


class TestComposeExitFrom(unittest.TestCase, RunSubprocessMixin):
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_podman_compose_exit_from(self):
"run",
podman_compose_path(),
"-f",
os.path.join(test_path(), "exit-from", "docker-compose.yaml"),
compose_yaml_path(),
"up",
]

Expand Down
10 changes: 5 additions & 5 deletions tests/unit/test_container_to_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ async def test_env_file_str(self):
c = create_compose_mock()

cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
cnt['env_file'] = env_file

args = await container_to_args(c, cnt)
Expand Down Expand Up @@ -295,7 +295,7 @@ async def test_env_file_str_array_one_path(self):
c = create_compose_mock()

cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
cnt['env_file'] = [env_file]

args = await container_to_args(c, cnt)
Expand All @@ -319,8 +319,8 @@ async def test_env_file_str_array_two_paths(self):
c = create_compose_mock()

cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file_2 = get_test_file_path('tests/integration/env-file-tests/env-files/project-2.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
env_file_2 = get_test_file_path('tests/integration/env_file_tests/env-files/project-2.env')
cnt['env_file'] = [env_file, env_file_2]

args = await container_to_args(c, cnt)
Expand Down Expand Up @@ -348,7 +348,7 @@ async def test_env_file_obj_required(self):
c = create_compose_mock()

cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
cnt['env_file'] = {'path': env_file, 'required': True}

args = await container_to_args(c, cnt)
Expand Down