def test_process(preserve_paths, index, choice): lang_name = choice([l["name"] for l in p.languages.values()]) p.process([PYCCO_SOURCE], preserve_paths=preserve_paths, index=index, outdir=tempfile.gettempdir(), language=lang_name)
def test_process_skips_unknown_languages(mock_guess_lexer): class Name: name = 'this language does not exist' mock_guess_lexer.return_value = Name() with pytest.raises(ValueError): p.process(['LICENSE'], outdir=tempfile.gettempdir(), skip=False) p.process(['LICENSE'], outdir=tempfile.gettempdir(), skip=True)
def test_process(preserve_paths, choice): lang_name = choice([l["name"] for l in p.languages.values()]) p.process([PYCCO_SOURCE], preserve_paths=preserve_paths, outdir=tempfile.gettempdir(), language=lang_name)
def test_process(preserve_paths, index, data): lang_name = data.draw(sampled_from([l["name"] for l in supported_languages.values()])) p.process([PYCCO_SOURCE], preserve_paths=preserve_paths, index=index, outdir=tempfile.gettempdir(), language=lang_name)