fix: resolve CI/CD test failures and linting issues
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-04 07:32:23 +00:00
parent 228e2c981b
commit 459737a1b0

View File

@@ -1,10 +1,9 @@
"""Tests for JSON converter."""
import pytest
import json
import pytest
import tempfile
import os
from pathlib import Path
from config_convert.converters import JSONConverter
@@ -63,14 +62,13 @@ class TestJSONConverter:
os.unlink(path)
def test_dump_file(self, converter, temp_dir, sample_json):
import shutil
path = tempfile.mktemp(suffix=".json")
try:
converter.dump(sample_json, path)
result = json.loads(Path(path).read_text())
result = json.loads(open(path).read())
assert result == sample_json
finally:
if Path(path).exists():
if os.path.exists(path):
os.unlink(path)
def test_invalid_json_raises(self, converter):