testing.unit.test_globmatch module

class testing.unit.test_globmatch.TestDoubleAsterisk(methodName='runTest')[source]

Bases: UnitTestCase

Test glob matching where the glob finishes with a **

test_asterisk_slash_double_asterisk()[source]

Test folder string ending in /*

test_double_asterisk_match()[source]

Test that a folder string ending in /** matches that path

test_double_asterisk_no_match()[source]

Test that a folder string ending /** does not match other paths

class testing.unit.test_globmatch.TestGlobToRegex(methodName='runTest')[source]

Bases: UnitTestCase

Test translation of glob strings into regular expressions

test_glob_to_regex()[source]

test_glob_re - test translation of shell pattern to regular exp

class testing.unit.test_globmatch.TestSelectValuesFromGlobs(methodName='runTest')[source]

Bases: UnitTestCase

Test the select values returned from various globs

test_double_asterisk_extension_include()[source]

Test **.py

test_double_asterisk_include()[source]

Test a few globbing patterns, including **

test_glob_scans_parent_directories()[source]

Test glob scans parent

class testing.unit.test_globmatch.TestSimpleUnicode(methodName='runTest')[source]

Bases: UnitTestCase

Test simple unicode comparison

test_simple_unicode()[source]

Test simple unicode comparison

class testing.unit.test_globmatch.TestSquareBrackets(methodName='runTest')[source]

Bases: UnitTestCase

Test glob matching where the glob includes []s and [!]s

test_not_square_bracket_options()[source]

Test file including options in [!]s

test_square_bracket_not_range()[source]

Test file including range in [!]s

test_square_bracket_options()[source]

Test file including options in []s

test_square_bracket_options_unicode()[source]

Test file including options in []s

test_square_bracket_range()[source]

Test file including range in []s

class testing.unit.test_globmatch.TestTrailingSlash(methodName='runTest')[source]

Bases: UnitTestCase

Test glob matching where the glob has a trailing slash

test_double_asterisk_string_slash()[source]

Test string starting with ** and ending in /

test_included_files_are_matched_no_slash()[source]

Test that files within an included folder are matched

test_included_files_are_matched_no_slash_2()[source]

Test that files within an included folder are matched

test_included_files_are_matched_slash()[source]

Test that files within an included folder are matched with /

test_included_files_are_matched_slash_2()[source]

Test that files within an included folder are matched with /

test_included_files_are_matched_slash_2_parents()[source]

Test that duplicity will scan parent of glob/

test_included_files_are_matched_slash_wildcard()[source]

Test that files within an included folder are matched with /

test_simple_trailing_slash_match()[source]

Test that a normal folder string ending in / matches that path

test_slash_matches_everything()[source]

Test / matches everything

test_slash_star_includes_folder_contents()[source]

Test that folder/* includes folder contents

test_slash_star_scans_folder()[source]

Test that folder/* scans folder/

test_slash_star_star_scans_folder()[source]

Test that folder/** scans folder/

test_string_double_asterisk_string_slash()[source]

Test string ** string /

test_trailing_slash_matches_only_dirs()[source]

Test matching where glob includes a trailing slash

testing.unit.test_globmatch.exc_sel_dir(glob_str, file_path)[source]

Returns result of sel_dir with include value set to 0

testing.unit.test_globmatch.exc_sel_file(glob_str, file_path)[source]

Returns result of sel_file with include value set to 0

testing.unit.test_globmatch.inc_sel_dir(glob_str, file_path)[source]

Returns result of sel_dir with include value set to 1

testing.unit.test_globmatch.inc_sel_file(glob_str, file_path)[source]

Returns result of sel_file with include value set to 1

testing.unit.test_globmatch.sel_dir(glob_str, include, file_path)[source]

As per sel_file, but mocks file_path to be a directory

testing.unit.test_globmatch.sel_file(glob_str, include, file_path)[source]

Returns the selection value for file_path, given the include value, returning: 0 - if the file should be excluded 1 - if the file should be included 2 - if the folder should be scanned for any included/excluded files None - if the selection function has nothing to say about the file

Note: including a folder implicitly includes everything within it.