fix: resolve CI/CD test failures and linting issues
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import pytest
|
||||
import tempfile
|
||||
import os
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
from config_convert.converters import TOMLConverter
|
||||
@@ -21,9 +20,9 @@ class TestTOMLConverter:
|
||||
|
||||
def test_loads_nested_toml(self, converter):
|
||||
data = """[database]
|
||||
host = "localhost"
|
||||
port = 5432
|
||||
"""
|
||||
host = "localhost"
|
||||
port = 5432
|
||||
"""
|
||||
result = converter.loads(data)
|
||||
assert result == {"database": {"host": "localhost", "port": 5432}}
|
||||
|
||||
@@ -63,7 +62,6 @@ class TestTOMLConverter:
|
||||
os.unlink(path)
|
||||
|
||||
def test_dump_file(self, converter, temp_dir, sample_toml):
|
||||
import shutil
|
||||
path = tempfile.mktemp(suffix=".toml")
|
||||
try:
|
||||
if sys.version_info >= (3, 11):
|
||||
@@ -75,7 +73,7 @@ class TestTOMLConverter:
|
||||
result = converter.load(path)
|
||||
assert result == data
|
||||
finally:
|
||||
if Path(path).exists():
|
||||
if os.path.exists(path):
|
||||
os.unlink(path)
|
||||
|
||||
def test_invalid_toml_raises(self, converter):
|
||||
|
||||
Reference in New Issue
Block a user