예제 #1
0
def test_modified_after__same_file():
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_a_older")
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_b_older")
    assert not modified_after("tests/data/timestamp_b_older",
                              "tests/data/timestamp_a_older")
예제 #2
0
def test_modified_after__not_modified_after():
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_a_younger")
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_b_younger")
    assert not modified_after("tests/data/timestamp_b_older",
                              "tests/data/timestamp_a_younger")
예제 #3
0
def test_modified_after__same_file():
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_a_older")
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_b_older")
    assert not modified_after("tests/data/timestamp_b_older",
                              "tests/data/timestamp_a_older")
예제 #4
0
def test_modified_after__not_modified_after():
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_a_younger")
    assert not modified_after("tests/data/timestamp_a_older",
                              "tests/data/timestamp_b_younger")
    assert not modified_after("tests/data/timestamp_b_older",
                              "tests/data/timestamp_a_younger")
예제 #5
0
파일: node.py 프로젝트: schae234/pypeline
    def is_outdated(self):
        """Returns true if the output exists (is_done == True), but one or more
        of the intput files appear to have been changed since the creation of the
        output files (based on the timestamps). A node that lacks either input or
        output files is never considered outdated."""

        if not self.is_done:
            return False
        elif not (self.input_files and self.output_files):
            return False

        return fileutils.modified_after(self.input_files, self.output_files)
예제 #6
0
파일: node.py 프로젝트: schae234/pypeline
    def is_outdated(self):
        """Returns true if the output exists (is_done == True), but one or more
        of the intput files appear to have been changed since the creation of the
        output files (based on the timestamps). A node that lacks either input or
        output files is never considered outdated."""

        if not self.is_done:
            return False
        elif not (self.input_files and self.output_files):
            return False

        return fileutils.modified_after(self.input_files, self.output_files)