mirror of
https://github.com/rendercv/rendercv.git
synced 2026-10-25 13:48:49 -04:00
fix tests
This commit is contained in:
1 parent
8a2045c7a1
commit
504ccd13f4
2 files changed
+14
-4
No files matched your search
+12
-3
@@ -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,
|
||||
)
|
||||
Reference in new issue
Block a user