testing.unit.test_selection module
- class testing.unit.test_selection.MatchingTest(methodName='runTest')[source]
Bases:
UnitTestCase
Test matching of file names against various selection functions
- test_file_prefix_sf_exception()[source]
test_file_prefix_sf_exception - see if FilePrefix error is returned
- test_ignore_case_prefix_override()[source]
test_ignore_case - confirm that ignorecase: overrides default. might seem a bit odd as ignore_case=False is the default, but –filter-strictcase is implemented by explicitly setting this parameter. this test should also cause a stop-and-think if someone changes said default arg value for general_get_sf() in future.
- class testing.unit.test_selection.ParseArgsTest(methodName='runTest')[source]
Bases:
UnitTestCase
Test argument parsing
- ParseTest(tuplelist, indicies, filelists=[])[source]
No error if running select on tuple goes over indicies
- test_commandline_asterisks_double_both()[source]
Unit test the functional test TestAsterisks.test_commandline_asterisks_double_both
- test_exclude_after_scan()[source]
Test select with an exclude after a pattern that would return a scan for that file
- test_exclude_filelist_asterisk_2()[source]
Identical to test_exclude_filelist, but with the exclude “select” replaced with ‘*’
- test_exclude_filelist_asterisk_3()[source]
Identical to test_exclude_filelist, but with the include “select” replaced with ‘*’
- test_exclude_filelist_asterisk_4()[source]
Identical to test_exclude_filelist, but with numerous excluded folders replaced with ‘*’
- test_exclude_filelist_asterisk_5()[source]
Identical to test_exclude_filelist, but with numerous included/excluded folders replaced with ‘*’
- test_exclude_filelist_double_asterisk()[source]
Identical to test_exclude_filelist, but with all included/excluded folders replaced with ‘**’
- test_exclude_filelist_single_asterisk_at_beginning()[source]
Exclude filelist testing limited functionality of functional test
- test_files_from_implicit_parents()[source]
Confirm that –files-from includes parent directories implicitly
- test_files_from_multiple_filelists()[source]
Check that –files-from can co-exist with other options using file lists
- test_files_from_null_separator()[source]
Check that –files-from works with null separators when requested
- test_files_from_with_exclusions()[source]
Confirm that –files-from still respects the usual file selection rules
- test_files_from_with_inclusions()[source]
Confirm that –files-from still respects the usual file selection rules
- test_globbing_replacement_filter_ignorecase()[source]
Test functional test test_globbing_replacement as a unittest - an alternate implementation of the above test which uses –filter-*case instead of the ignorecase: prefix.
- test_include_filelist_1_leading_whitespace()[source]
Filelist glob test similar to globbing filelist, but with 1 leading whitespace on include
- test_include_filelist_1_leading_whitespace_exclude()[source]
Filelist glob test similar to globbing filelist, but with 1 leading whitespace on exclude
- test_include_filelist_1_trailing_whitespace()[source]
Filelist glob test similar to globbing filelist, but with 1 trailing whitespace on include
- test_include_filelist_1_trailing_whitespace_exclude()[source]
Filelist glob test similar to globbing filelist, but with 1 trailing whitespace on exclude
- test_include_filelist_2_leading_whitespaces()[source]
Filelist glob test similar to globbing filelist, but with 2 leading whitespaces on include
- test_include_filelist_2_leading_whitespaces_exclude()[source]
Filelist glob test similar to globbing filelist, but with 2 leading whitespaces on exclude
- test_include_filelist_2_trailing_whitespace_exclude()[source]
Filelist glob test similar to globbing filelist, but with 2 trailing whitespaces on exclude
- test_include_filelist_2_trailing_whitespaces()[source]
Filelist glob test similar to globbing filelist, but with 2 trailing whitespaces on include
- test_include_filelist_asterisk_2()[source]
Identical to test_filelist, but with the exclude “select” replaced with ‘*’
- test_include_filelist_asterisk_3()[source]
Identical to test_filelist, but with the auto-include “select” replaced with ‘*’
- test_include_filelist_asterisk_4()[source]
Identical to test_filelist, but with a specific include “select” replaced with ‘*’
- test_include_filelist_asterisk_5()[source]
Identical to test_filelist, but with all ‘select’s replaced with ‘*’
- test_include_filelist_asterisk_6()[source]
Identical to test_filelist, but with numerous excluded folders replaced with ‘*’
- test_include_filelist_asterisk_7()[source]
Identical to test_filelist, but with numerous included/excluded folders replaced with ‘*’
- test_include_filelist_check_excluded_folder_included_for_contents()[source]
Filelist glob test to check excluded folder is included if contents are
- test_include_filelist_double_asterisk_1()[source]
Identical to test_filelist, but with the exclude “select’ replaced with ‘**’
- test_include_filelist_double_asterisk_2()[source]
Identical to test_filelist, but with the include ‘select’ replaced with ‘**’
- test_include_filelist_double_asterisk_3()[source]
Identical to test_filelist, but with the exclude ‘testfiles/select’ replaced with ‘**’
- test_include_filelist_double_asterisk_4()[source]
Identical to test_filelist, but with the include ‘testfiles/select’ replaced with ‘**’
- test_include_filelist_double_asterisk_5()[source]
Identical to test_filelist, but with all ‘testfiles/select’s replaced with ‘**’
- test_include_filelist_trailing_slashes()[source]
Filelist glob test similar to globbing filelist, but with trailing slashes
- test_include_filelist_trailing_slashes_and_double_asterisks()[source]
Filelist glob test similar to globbing filelist, but with trailing slashes and double asterisks
- test_include_filelist_trailing_slashes_and_single_asterisks()[source]
Filelist glob test similar to globbing filelist, but with trailing slashes and single asterisks
- test_include_filelist_with_blank_line()[source]
Filelist glob test similar to globbing filelist, but with a blank line.
- test_include_filelist_with_blank_line_and_whitespace()[source]
Filelist glob test similar to globbing filelist, but with a blank line and whitespace.
- test_include_filelist_with_full_line_comment()[source]
Filelist glob test similar to globbing filelist, but with a full-line comment.
- test_include_filelist_with_unnecessary_double_quotes()[source]
Filelist glob test similar to globbing filelist, but with double quotes around one of the paths.
- test_include_filelist_with_unnecessary_quotes()[source]
Filelist glob test similar to globbing filelist, but with quotes around one of the paths.
- test_includes_files_trailing_slash()[source]
Unit test the functional test test_includes_files_trailing_slash
- class testing.unit.test_selection.TestGlobGetSf(methodName='runTest')[source]
Bases:
UnitTestCase
Test glob parsing of the test_glob_get_sf function. Indirectly test behaviour of glob_to_re.
- glob_tester(path, glob_string, include_exclude, root_path, ignore_case)[source]
Takes a path, glob string and include_exclude value (1 = include, 0 = exclude) and returns the output of the selection function. None - means the test has nothing to say about the related file 0 - the file is excluded by the test 1 - the file is included 2 - the test says the file (must be directory) should be scanned
- test_glob_dirs_to_scan_glob()[source]
Test parent directories are marked as needing to be scanned - globs
- test_glob_get_sf_2_ignorecase()[source]
Test same behaviour as the functional test test_globbing_replacement, ignorecase tests.
- test_glob_get_sf_3_double_asterisks_dirs_to_scan()[source]
Test double asterisk (**) replacement in glob_get_sf with directories that should be scanned