コード例 #1
0
ファイル: test_misc.py プロジェクト: njalerikson/conda-build
def test_crossplatform_st_link(tmpdir):
    from os import link
    test_file = join(str(tmpdir), "test-file")
    test_file_linked = join(str(tmpdir), "test-file-linked")
    test_file_link = join(str(tmpdir), "test-file-link")

    open(test_file, "a").close()
    open(test_file_link, "a").close()
    link(test_file_link, test_file_linked)
    assert 1 == CrossPlatformStLink.st_nlink(test_file)
    assert 2 == CrossPlatformStLink.st_nlink(test_file_link)
    assert 2 == CrossPlatformStLink.st_nlink(test_file_linked)
コード例 #2
0
ファイル: test_misc.py プロジェクト: cav71/conda-build
def test_crossplatform_st_link(tmpdir):
    from os import link
    test_file = join(str(tmpdir), "test-file")
    test_file_linked = join(str(tmpdir), "test-file-linked")
    test_file_link = join(str(tmpdir), "test-file-link")

    open(test_file, "a").close()
    open(test_file_link, "a").close()
    link(test_file_link, test_file_linked)
    assert 1 == CrossPlatformStLink.st_nlink(test_file)
    assert 2 == CrossPlatformStLink.st_nlink(test_file_link)
    assert 2 == CrossPlatformStLink.st_nlink(test_file_linked)
コード例 #3
0
ファイル: test_misc.py プロジェクト: njalerikson/conda-build
def test_crossplatform_st_link_on_win(tmpdir):
    test_file = join(str(tmpdir), "test-file")
    open(test_file, "a").close()
    assert 1 == CrossPlatformStLink.st_nlink(test_file)
コード例 #4
0
ファイル: test_misc.py プロジェクト: cav71/conda-build
def test_crossplatform_st_link_on_win(tmpdir):
    test_file = join(str(tmpdir), "test-file")
    open(test_file, "a").close()
    assert 1 == CrossPlatformStLink.st_nlink(test_file)