Beispiel #1
0
def test_should_exclude_with_complex_matching_regex():
    filesystem = FileSystem()
    result = filesystem.should_exclude('/var/folders/j9/h192v5v95gd_fhpv63qzyd1400d9ct/T/T497XPQH2R/UATR2GZZTX/2016-04-Apr/London/2016-04-07_11-15-26-valid-sample-title.txt', {re.compile('London.*\.txt$')})
    assert result == True, result
Beispiel #2
0
def test_should_exclude_with_non_matching_regex():
    filesystem = FileSystem()
    result = filesystem.should_exclude('/some/path', {re.compile('foobar')})
    assert result == False, result
Beispiel #3
0
def test_should_exclude_with_multiple_with_one_matching_regex():
    filesystem = FileSystem()
    result = filesystem.should_exclude('/some/path', {re.compile('foobar'), re.compile('some')})
    assert result == True, result
Beispiel #4
0
def test_should_exclude_with_no_exclude_arg():
    filesystem = FileSystem()
    result = filesystem.should_exclude('/some/path')
    assert result == False, result