diff --git a/run_rendercv.py b/run_rendercv.py index 2aea5b8..3dcc487 100644 --- a/run_rendercv.py +++ b/run_rendercv.py @@ -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 \ No newline at end of file +# 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)) + diff --git a/tests/test_rendering.py b/tests/test_rendering.py index 562f1b1..6ba11e8 100644 --- a/tests/test_rendering.py +++ b/tests/test_rendering.py @@ -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, )