Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
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)