예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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)
예제 #4
0
def test_create_examples(tmpdir):
    tmpdir.chdir()
    verify_and_test_examples(cruft.create)
예제 #5
0
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)
예제 #6
0
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)