def test_update_examples(project_dir, tmpdir): tmpdir.chdir() with pytest.raises(exceptions.NoCruftFound): verify_and_test_examples(cruft.update) os.chdir(project_dir) verify_and_test_examples(cruft.update)
def test_check_examples(tmpdir, project_dir): tmpdir.chdir() with pytest.raises(exceptions.NoCruftFound): verify_and_test_examples(cruft.check) os.chdir(project_dir) verify_and_test_examples(cruft.check)
def test_link_examples(project_dir, tmpdir): os.chdir(project_dir) with pytest.raises(exceptions.CruftAlreadyPresent): verify_and_test_examples(cruft.link) tmpdir.chdir() Repo.clone_from("https://github.com/timothycrosley/cruft", str(tmpdir)) os.remove(os.path.join(tmpdir, ".cruft.json")) verify_and_test_examples(cruft.link)
def test_create_examples(tmpdir): tmpdir.chdir() verify_and_test_examples(cruft.create)
def test_check_examples(project_dir): with pytest.raises(exceptions.NoCruftFound): verify_and_test_examples(api.check) os.chdir(project_dir) verify_and_test_examples(api.check)
def test_separate_project_examples(): assert api_examples assert api examples.verify_and_test_examples(api)
def test_separate_project_examples(): examples.verify_and_test_examples(api)