@@ -10,16 +10,21 @@ def list_examples():
1010
1111
1212@pytest .mark .parametrize ("example" , list_examples ())
13- def test_application_with_example (example : Path ):
13+ def test_application_with_example (tmp_path , example : Path ):
1414 """Test the application with each example topology files"""
1515
1616 assert example .exists () and example .is_file (), "topology file doesn't exist"
1717
18- with tempfile .TemporaryDirectory () as temp_dir :
19- cmd = ["precice-case-generate" , "-f" , str (example ), "-o" , temp_dir ]
20- print (f"Running { cmd } " )
21- subprocess .run (cmd )
18+ cmd = ["precice-case-generate" , "-f" , str (example ), "-o" , str (tmp_path )]
19+ print (f"Running { cmd } " )
20+ subprocess .run (cmd , check = True )
2221
23- output = [p .name for p in Path (temp_dir ).iterdir ()]
24- print (f"Output { output } " )
25- assert output , "Nothing generated"
22+ output = list (tmp_path .iterdir ())
23+ print (f"Output { [p .name for p in output ]} " )
24+ assert output , "Nothing generated"
25+
26+ config = tmp_path / "precice-config.xml"
27+
28+ assert config .exists (), "No precice-config.xml generated"
29+
30+ subprocess .run (["precice-cli" , "config" , "check" , str (config )], check = True )
0 commit comments