Moved coverage calls, why out_step is wrongly reported?

This commit is contained in:
Salvador E. Tropea 2021-02-04 16:20:57 -03:00
parent 41c667cb1f
commit 437f922341
1 changed files with 12 additions and 12 deletions

View File

@ -252,18 +252,18 @@ def test_step_fail(test_dir, caplog, monkeypatch):
# We will patch subprocess.check_output to make rar fail # We will patch subprocess.check_output to make rar fail
with monkeypatch.context() as m: with monkeypatch.context() as m:
patch_functions(m) patch_functions(m)
detect_kicad() with context.cover_it(cov):
load_actions() detect_kicad()
GS.set_pcb(ctx.board_file) load_actions()
GS.board = None GS.set_pcb(ctx.board_file)
KiConf.loaded = False GS.board = None
load_board() KiConf.loaded = False
# Create a compress object with the dummy file as source load_board()
out = RegOutput.get_class_for('step')() # Create a compress object with the dummy file as source
out.set_tree({}) out = RegOutput.get_class_for('step')()
out.config() out.set_tree({})
with pytest.raises(SystemExit) as e: out.config()
with context.cover_it(cov): with pytest.raises(SystemExit) as e:
out.run('') out.run('')
# Check we exited because rar isn't installed # Check we exited because rar isn't installed
assert e.type == SystemExit assert e.type == SystemExit