mirror of
https://github.com/containers/podman-compose.git
synced 2025-08-17 00:51:19 +02:00
@ -3,9 +3,10 @@ test_podman_compose_config.py
|
||||
|
||||
Tests the podman-compose config command which is used to return defined compose services.
|
||||
"""
|
||||
import pytest
|
||||
# pylint: disable=redefined-outer-name
|
||||
import os
|
||||
from test_podman_compose import capture
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@ -23,7 +24,7 @@ def test_config_no_profiles(podman_compose_path, profile_compose_file):
|
||||
"""
|
||||
config_cmd = ["python3", podman_compose_path, "-f", profile_compose_file, "config"]
|
||||
|
||||
out, err, return_code = capture(config_cmd)
|
||||
out, _, return_code = capture(config_cmd)
|
||||
assert return_code == 0
|
||||
|
||||
string_output = out.decode("utf-8")
|
||||
@ -63,7 +64,7 @@ def test_config_profiles(
|
||||
config_cmd = ["python3", podman_compose_path, "-f", profile_compose_file]
|
||||
config_cmd.extend(profiles)
|
||||
|
||||
out, err, return_code = capture(config_cmd)
|
||||
out, _, return_code = capture(config_cmd)
|
||||
assert return_code == 0
|
||||
|
||||
actual_output = out.decode("utf-8")
|
||||
@ -71,7 +72,7 @@ def test_config_profiles(
|
||||
assert len(expected_services) == 3
|
||||
|
||||
actual_services = {}
|
||||
for service, expected_check in expected_services.items():
|
||||
for service, _ in expected_services.items():
|
||||
actual_services[service] = service in actual_output
|
||||
|
||||
assert expected_services == actual_services
|
||||
|
Reference in New Issue
Block a user