def test_ufolint_runner_ufo3_check_layercontents_plist_method_fail(): lc_fail_path = os.path.join(ufo_fail_dir_basepath, 'layercontentsPL', 'UFO3-MissingLC.ufo') mr = MainRunner(lc_fail_path) with pytest.raises(SystemExit) as pytest_wrapped_e: mr._check_layercontents_plist_exists() assert pytest_wrapped_e.type == SystemExit assert pytest_wrapped_e.value.code == 1
def test_ufolint_runner_ufo2_check_layercontents_plist_method_fail(): """ UFOv2 does not include a layercontents.plist file in spec. the test dir does not include this file. this test is run in a version specific manner in runner.py so it should fail """ mr = MainRunner(ufo2_test_success_path) with pytest.raises(SystemExit) as pytest_wrapped_e: mr._check_layercontents_plist_exists() assert pytest_wrapped_e.type == SystemExit assert pytest_wrapped_e.value.code == 1
def test_ufolint_runner_ufo3_check_layercontents_plist_method_success(capsys): ss = StdStreamer(ufo3_test_success_path) mr = MainRunner(ufo3_test_success_path) mr._check_layercontents_plist_exists() out, err = capsys.readouterr() assert out == ss.short_success_string