Пример #1
0
def test_directory_last_updated_reflects_file_changes(root):
    os.mkdir("source")
    open("source/one", "w").close()
    open("source/two", "w").close()
    d = Directory("target", source="source")
    root.component += d
    root.component.deploy()
    assert (d.last_updated() == os.stat(
        os.path.join(root.workdir, "target", "two")).st_mtime)
Пример #2
0
def test_directory_last_updated_reflects_file_changes(root):
    os.mkdir('source')
    open('source/one', 'w').close()
    open('source/two', 'w').close()
    d = Directory('target', source='source')
    root.component += d
    root.component.deploy()
    assert (d.last_updated() == os.stat(
        os.path.join(root.workdir, 'target', 'two')).st_mtime)