diff --git a/podman_compose.py b/podman_compose.py index d4cc1d4..fe3e200 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1627,7 +1627,7 @@ def _parse_compose_file(self): compose.get("services", {}), set(args.profile) ) compose["services"] = resolved_services - if not args.no_normalize: + if not getattr(args, "no_normalize", None): compose = normalize_final(compose, self.dirname) self.merged_yaml = yaml.safe_dump(compose) merged_json_b = json.dumps(compose, separators=(",", ":")).encode("utf-8") diff --git a/pytests/test_normalize_final_build.py b/pytests/test_normalize_final_build.py index 49ff3cd..e281174 100644 --- a/pytests/test_normalize_final_build.py +++ b/pytests/test_normalize_final_build.py @@ -99,25 +99,6 @@ ] -# -# [service.build] is not normalised before coompose files are merged -# -def test_pre_merge_normalize_service_does_not_affect_build_section() -> None: - for test_input, _ in copy.deepcopy(test_cases_simple_normalization): - expected_service = copy.deepcopy(test_input) - actual_service = normalize_service(test_input) - assert expected_service == actual_service - - -def test_pre_merge_normalize_does_not_affect_build_section() -> None: - for test_input, _ in copy.deepcopy(test_cases_simple_normalization): - expected_result = copy.deepcopy(test_input) - compose_test = {"services": {"test-service": test_input}} - compose_expected = {"services": {"test-service": expected_result}} - actual_compose = normalize(compose_test) - assert compose_expected == actual_compose - - # # [service.build] is normalised after merges #