testing.functional.test_selection module¶
-
class
testing.functional.test_selection.
IncludeExcludeFunctionalTest
(methodName='runTest')[source]¶ Bases:
testing.functional.FunctionalTestCase
This contains methods used in the tests below for testing the include, exclude and various filelist features.
-
complete_directory_tree
= [['1', '2', '3', 'trailing_space ', '1.doc', '1.py'], ['1sub1', '1sub2', '1sub3'], ['1sub1sub1', '1sub1sub2', '1sub1sub3'], ['1sub1sub1_file.txt'], ['1sub1sub2_file.txt'], ['1sub1sub3_file.txt'], ['1sub2sub1', '1sub2sub2', '1sub2sub3'], ['1sub3sub1', '1sub3sub2', '1sub3sub3'], ['2sub1', '2sub2', '2sub3'], ['2sub1sub1', '2sub1sub2', '2sub1sub3'], ['2sub1sub1_file.txt'], ['2sub2sub1', '2sub2sub2', '2sub2sub3'], ['2sub3sub1', '2sub3sub2', '2sub3sub3'], ['3sub1', '3sub2', '3sub3'], ['3sub1sub1', '3sub1sub2', '3sub1sub3'], ['3sub2sub1', '3sub2sub2', '3sub2sub3'], ['3sub3sub1', '3sub3sub2', '3sub3sub3'], ['3sub3sub2_file.txt'], ['trailing_space sub1', 'trailing_space sub2'], ['trailing_space sub2_file.txt']]¶
-
directory_tree_to_list_of_lists
(parent_directory)[source]¶ This takes a folder as an input and returns a list with its contents. If the directory has subdirectories, it returns a list of lists with the contents of those subdirectories.
-
expected_restored_tree
= [['1', '2', '3', '1.py'], ['1sub1', '1sub2', '1sub3'], ['1sub1sub1', '1sub1sub3'], ['1sub1sub1_file.txt'], ['1sub2sub1'], ['1sub3sub3'], ['2sub1'], ['2sub1sub1'], ['2sub1sub1_file.txt'], ['3sub2', '3sub3'], ['3sub2sub1', '3sub2sub2', '3sub2sub3'], ['3sub3sub1', '3sub3sub2', '3sub3sub3'], ['3sub3sub2_file.txt']]¶
-
expected_restored_tree_with_trailing_space
= [['1', '2', '3', 'trailing_space ', '1.py'], ['1sub1', '1sub2', '1sub3'], ['1sub1sub1', '1sub1sub3'], ['1sub1sub1_file.txt'], ['1sub2sub1'], ['1sub3sub3'], ['2sub1'], ['2sub1sub1'], ['2sub1sub1_file.txt'], ['3sub2', '3sub3'], ['3sub2sub1', '3sub2sub2', '3sub2sub3'], ['3sub3sub1', '3sub3sub2', '3sub3sub3'], ['3sub3sub2_file.txt'], ['trailing_space sub1', 'trailing_space sub2'], ['trailing_space sub2_file.txt']]¶
-
-
class
testing.functional.test_selection.
TestAbsolutePaths
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
Tests include/exclude options with absolute paths
-
class
testing.functional.test_selection.
TestAsterisks
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
Test to check that asterisks work as expected Exhibits the issue reported in Bug #884371 (https://bugs.launchpad.net/duplicity/+bug/884371). See the unit tests for more granularity on the issue.
-
test_commandline_asterisks_double_both
()[source]¶ test_commandline_include_exclude with double asterisks on both exclude and include lines.
-
test_commandline_asterisks_double_exclude_only
()[source]¶ test_commandline_include_exclude with double asterisks on exclude lines.
-
test_commandline_asterisks_single_both
()[source]¶ test_commandline_include_exclude with single asterisks on both exclude and include lines.
-
test_commandline_asterisks_single_excludes_only
()[source]¶ test_commandline_include_exclude with single asterisks on exclude lines.
-
test_exclude_filelist_asterisks_double_asterisks
()[source]¶ Exclude filelist with double asterisks replacing folders.
-
test_exclude_filelist_asterisks_single
()[source]¶ Exclude filelist with asterisks replacing folders.
-
-
class
testing.functional.test_selection.
TestCheckTestFiles
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
Tests the testfiles required by the exclude/include tests are as expected.
-
class
testing.functional.test_selection.
TestExcludeFilelistTest
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
Test –exclude-filelist using duplicity binary.
-
test_exclude_filelist_combined_imperfections
()[source]¶ Test that exclude filelist works with imperfections in the input file
-
test_exclude_filelist_progress_option
()[source]¶ Test that exclude filelist is unaffected by the –progress option
-
-
class
testing.functional.test_selection.
TestExcludeIfPresent
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
This tests the behaviour of duplicity’s –exclude-if-present option
-
class
testing.functional.test_selection.
TestFolderIncludesFiles
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
This tests that including a folder includes the files within it
-
test_excludes_files_no_trailing_slash
()[source]¶ This tests that excluding a folder excludes the files within it
-
test_excludes_files_trailing_slash
()[source]¶ Excluding a folder excludes the files within it, if ends with /
-
test_excludes_files_trailing_slash_globbing_chars
()[source]¶ Tests folder excludes with globbing char and /
-
-
class
testing.functional.test_selection.
TestGlobbingReplacement
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
This tests the behaviour of the extended shell globbing pattern replacement functions.
-
class
testing.functional.test_selection.
TestIncludeExcludeOptions
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
This tests the behaviour of the duplicity binary when the include/exclude options are passed directly
-
class
testing.functional.test_selection.
TestIncludeExcludedForContents
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
Test to check that folders that are excluded are included if they contain includes of higher priority. Exhibits the issue reported in Bug #1408411 (https://bugs.launchpad.net/duplicity/+bug/1408411).
-
restore_and_check
()[source]¶ Restores the backup and compares to what was expected (based on the filelist in write_filelist)
-
test_commandline_include_exclude
()[source]¶ test an excluded folder is included for included contents when using commandline includes and excludes
-
test_exclude_filelist
()[source]¶ test an excluded folder is included for included contents with an exclude-filelist (non-globbing)
-
test_exclude_globbing_filelist
()[source]¶ test an excluded folder is included for included contents with an exclude-globbing-filelist
-
test_include_filelist
()[source]¶ test an excluded folder is included for included contents with an include-filelist (non-globbing)
-
-
class
testing.functional.test_selection.
TestIncludeFilelistTest
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
Test –include-filelist using duplicity binary.
-
test_include_filelist_combined_imperfections
()[source]¶ Test that include filelist works with imperfections in the input file
-
-
class
testing.functional.test_selection.
TestLockedFoldersNoError
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
This tests that inaccessible folders do not cause an error
-
class
testing.functional.test_selection.
TestTrailingSlash
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
Test to check that a trailing slash works as expected Exhibits the issue reported in Bug #932482 (https://bugs.launchpad.net/duplicity/+bug/932482).
-
test_exclude_filelist_trailing_slashes
()[source]¶ test_exclude_filelist_asterisks_none with trailing slashes.
-
test_exclude_filelist_trailing_slashes_double_wildcards_excludes
()[source]¶ test_exclude_filelist_trailing_slashes with double wildcards in excludes.
-
test_exclude_filelist_trailing_slashes_double_wildcards_excludes_2
()[source]¶ second test_exclude_filelist_trailing_slashes with double wildcards in excludes.
-
-
class
testing.functional.test_selection.
TestTrailingSlash2
(methodName='runTest')[source]¶ Bases:
testing.functional.test_selection.IncludeExcludeFunctionalTest
This tests the behaviour of globbing strings with a trailing slash
-
test_include_files_not_subdirectories
()[source]¶ Test that a trailing slash glob followed by a * glob only matches files and not subdirectories
-