feat: add pyyaml
This commit is contained in:
parent
75bb6d6667
commit
078ebd8147
2
pdm.lock
2
pdm.lock
|
@ -5,7 +5,7 @@
|
|||
groups = ["default", "dev", "lint", "test"]
|
||||
strategy = ["inherit_metadata"]
|
||||
lock_version = "4.5.0"
|
||||
content_hash = "sha256:6757968c6c0d6bac2715cd137f74ac1d5696aae59c2079afe788c8338716646a"
|
||||
content_hash = "sha256:d0c5550bb08b549f50b06136edcc32fe9607d8e59a05d891949095633ef4a83e"
|
||||
|
||||
[[metadata.targets]]
|
||||
requires_python = ">=3.10"
|
||||
|
|
|
@ -6,7 +6,7 @@ build-backend = "pdm.backend"
|
|||
name = "JOJ3-config-generator"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"PyYAML>=6.0.2",
|
||||
"pyyaml>=6.0.2",
|
||||
"typer>=0.12.5",
|
||||
"loguru>=0.7.2",
|
||||
"pydantic>=2.9.2",
|
||||
|
|
|
@ -4,6 +4,7 @@ from typing import Any, Dict, List, Tuple
|
|||
|
||||
import pytest
|
||||
import rtoml
|
||||
import yaml
|
||||
|
||||
from joj3_config_generator.models import JOJ1Config, TaskConfig
|
||||
from tests.utils import safe_id
|
||||
|
@ -19,7 +20,7 @@ def read_convert_joj1_files(root: str) -> Tuple[JOJ1Config, TaskConfig, Dict[str
|
|||
task_toml = task_file.read()
|
||||
with open(expected_json_path) as result_file:
|
||||
expected_result: Dict[str, Any] = json.load(result_file)
|
||||
joj1_obj = rtoml.loads(task_yaml)
|
||||
joj1_obj = yaml.safe_load(task_yaml)
|
||||
task_obj = rtoml.loads(task_toml)
|
||||
return JOJ1Config(**joj1_obj), TaskConfig(**task_obj), expected_result
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user