From 1085fbe3ee42c00a24d023a5ce56722ecbecae3b Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Wed, 4 Feb 2026 07:32:23 +0000 Subject: [PATCH] fix: resolve CI/CD test failures and linting issues --- tests/test_converters/test_yaml.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/test_converters/test_yaml.py b/tests/test_converters/test_yaml.py index 2248f94..4390335 100644 --- a/tests/test_converters/test_yaml.py +++ b/tests/test_converters/test_yaml.py @@ -3,7 +3,7 @@ import pytest import tempfile import os -from pathlib import Path +import yaml from config_convert.converters import YAMLConverter @@ -20,9 +20,9 @@ class TestYAMLConverter: def test_loads_nested_yaml(self, converter): data = """database: - host: localhost - port: 5432 - """ + host: localhost + port: 5432 +""" result = converter.loads(data) assert result == {"database": {"host": "localhost", "port": 5432}} @@ -33,9 +33,9 @@ class TestYAMLConverter: def test_loads_multiline_string(self, converter): data = """description: | - This is a - multiline string - """ + This is a + multiline string +""" result = converter.loads(data) assert result["description"] == "This is a\nmultiline string\n" @@ -56,7 +56,6 @@ class TestYAMLConverter: assert loaded == original def test_load_file(self, converter, temp_file, sample_yaml): - import yaml gen = temp_file(sample_yaml, suffix=".yaml") path = next(gen) try: @@ -66,8 +65,6 @@ class TestYAMLConverter: os.unlink(path) def test_dump_file(self, converter, temp_dir, sample_yaml): - import yaml - import shutil path = tempfile.mktemp(suffix=".yaml") try: data = yaml.safe_load(sample_yaml) @@ -75,7 +72,7 @@ class TestYAMLConverter: result = converter.load(path) assert result == data finally: - if Path(path).exists(): + if os.path.exists(path): os.unlink(path) def test_invalid_yaml_raises(self, converter):