mirror of https://github.com/eyhc1/rendercv.git
fix tests
This commit is contained in:
parent
8a2045c7a1
commit
504ccd13f4
|
@ -1,9 +1,18 @@
|
|||
import rendercv.__main__ as rendercv
|
||||
|
||||
input_file_path = "personal.yaml"
|
||||
rendercv.main(input_file_path)
|
||||
# input_file_path = "personal.yaml"
|
||||
# rendercv.main(input_file_path)
|
||||
|
||||
# This script is equivalent to running the following command in the terminal:
|
||||
# python -m rendercv personal.yaml
|
||||
# or
|
||||
# rendercv personal.yaml
|
||||
# rendercv personal.yaml
|
||||
|
||||
from rendercv.data_model import RenderCVDataModel
|
||||
|
||||
jsoan = RenderCVDataModel.model_json_schema()
|
||||
import json
|
||||
# write json to file
|
||||
with open("json_schema.json", "w") as f:
|
||||
f.write(json.dumps(jsoan))
|
||||
|
||||
|
|
|
@ -518,7 +518,7 @@ class TestRendering(unittest.TestCase):
|
|||
|
||||
# Wrong input:
|
||||
with self.subTest(msg="Wrong input"):
|
||||
with self.assertRaises(ValueError, msg="Value error didn't raise."):
|
||||
with self.assertRaises(subprocess.CalledProcessError):
|
||||
subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
|
@ -526,4 +526,5 @@ class TestRendering(unittest.TestCase):
|
|||
"rendercv",
|
||||
"wrong_input.yaml",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue