コード例 #1
0
def test_binder_dir_property(tmpdir, binder_dir):
    tmpdir.chdir()
    os.mkdir(binder_dir)

    bp = buildpacks.BuildPack()
    assert binder_dir in bp.binder_dir
    assert bp.binder_path("foo.yaml") == os.path.join(binder_dir, "foo.yaml")
コード例 #2
0
def test_exclusive_binder_dir(tmpdir):
    tmpdir.chdir()
    os.mkdir("./binder")
    os.mkdir("./.binder")

    bp = buildpacks.BuildPack()
    with pytest.raises(RuntimeError):
        _ = bp.binder_dir
コード例 #3
0
def test_root_binder_dir(tmpdir):
    tmpdir.chdir()
    bp = buildpacks.BuildPack()
    assert bp.binder_dir == ""