def should_find_files_by_pattern_matching(self): env.writefile('lol.foo', 'lol') first_checksum = checksum_recursively(TEST_OUTPUT_DIR, pattern='*.foo') env.writefile('lol.foo', 'lol\nlol again') second_checksum = checksum_recursively(TEST_OUTPUT_DIR, pattern='*.foo') first_checksum |should_be.less_than| second_checksum
def should_find_python_files_in_dir(self): env.writefile('lol.py', 'lol') first_checksum = checksum_recursively(TEST_OUTPUT_DIR, pattern='*.py') env.writefile('lol.py', 'lol\nlol again') second_checksum = checksum_recursively(TEST_OUTPUT_DIR, pattern='*.py') first_checksum |should_be.less_than| second_checksum
def should_find_python_files_in_subdirs(self): env.mkdir('foo') env.mkdir('foo/bar') foo_path = os.path.join(TEST_OUTPUT_DIR, 'foo') env.writefile('foo/bar/lol.py', 'lol') first_checksum = checksum_recursively(foo_path, pattern='*.py') env.writefile('foo/bar/lol.py', 'lol\nlol again') second_checksum = checksum_recursively(foo_path, pattern='*.py') first_checksum |should_be.less_than| second_checksum
def should_find_files_by_relative_paths(self): env.writefile('lol.foo', 'lol') first_checksum = checksum_recursively('tests/test-output', pattern='*.foo') env.writefile('lol.foo', 'lol\nlol again') second_checksum = checksum_recursively(TEST_OUTPUT_DIR, pattern='*.foo')
def should_be_possible_to_pass_patterns(self): before = something_has_changed(TEST_OUTPUT_DIR, pattern='*.ext') env.writefile('myfile.ext', 'my text') after = something_has_changed(TEST_OUTPUT_DIR, pattern='*.ext') after |should_be| True before |should_be| False
def should_be_true_if_there_are_changes_and_false_if_not(self): before = something_has_changed(TEST_OUTPUT_DIR, '*.py') env.writefile('dummy.py', 'dummy') after = something_has_changed(TEST_OUTPUT_DIR, '*.py') after |should_be| True before |should_be| False