def test_migrate_file(td):
    src = pjoin(td, 'src')
    dst = pjoin(td, 'dst')
    touch(src, 'test file')
    assert migrate_file(src, dst)
    assert_files_equal(src, dst)

    src2 = pjoin(td, 'src2')
    touch(src2, 'different src')
    assert not migrate_file(src2, dst)
    assert_files_equal(src, dst)
Example #2
0
def test_migrate_file(td):
    src = pjoin(td, 'src')
    dst = pjoin(td, 'dst')
    touch(src, 'test file')
    assert migrate_file(src, dst)
    assert_files_equal(src, dst)
    
    src2 = pjoin(td, 'src2')
    touch(src2, 'different src')
    assert not migrate_file(src2, dst)
    assert_files_equal(src, dst)
 def notice_m_file(src, dst):
     called['migrate_file'] = True
     return migrate_file(src, dst)
Example #4
0
 def notice_m_file(src, dst):
     called['migrate_file'] = True
     return migrate_file(src, dst)