| 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- |
| 3 | """Tests for the zip resolver helper implementation.""" |
| 4 | |
| 5 | import unittestscip-python python python-stdlib 3.11 unittest/__init__: |
| 6 | |
| 7 | from dfvfs.libscip-python python dfvfs 20251019 `dfvfs.lib`/__init__: import definitionsscip-python python dfvfs 20251019 `dfvfs.lib.definitions`/__init__: |
| 8 | from dfvfs.pathscip-python python dfvfs 20251019 `dfvfs.path`/__init__: import factory as path_spec_factory |
| 9 | from dfvfs.resolver_helpersscip-python python dfvfs 20251019 `dfvfs.resolver_helpers`/__init__: import zip_resolver_helperscip-python python dfvfs 20251019 `dfvfs.resolver_helpers.zip_resolver_helper`/__init__: |
| 10 | |
| 11 | from tests.resolver_helpersscip-python python dfvfs 20251019 `tests.resolver_helpers`/__init__: import test_libscip-python python dfvfs 20251019 `tests.resolver_helpers.test_lib`/__init__: |
| 12 | |
| 13 | |
| 14 | class ZipResolverHelperTestscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#(test_libscip-python python dfvfs 20251019 `tests.resolver_helpers.test_lib`/__init__:.ResolverHelperTestCasescip-python python dfvfs 20251019 `tests.resolver_helpers.test_lib`/ResolverHelperTestCase#): |
| 15 | """Tests for the zip resolver helper implementation.""" |
| 16 | |
| 17 | def setUpscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#setUp().(selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#setUp().(self)): |
| 18 | """Sets up the needed objects used throughout the test.""" |
| 19 | superscip-python python python-stdlib 3.11 builtins/super#(ZipResolverHelperTestscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#, selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#setUp().(self)).setUpscip-python python dfvfs 20251019 `tests.resolver_helpers.test_lib`/ResolverHelperTestCase#setUp().() |
| 20 | |
| 21 | test_path = selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#setUp().(self)._GetTestFilePathscip-python python dfvfs 20251019 `tests.test_lib`/BaseTestCase#_GetTestFilePath().(['syslog.zip']) |
| 22 | selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#setUp().(self)._SkipIfPathNotExistsscip-python python dfvfs 20251019 `tests.test_lib`/BaseTestCase#_SkipIfPathNotExists().(test_path) |
| 23 | |
| 24 | selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#setUp().(self)._os_path_specscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#_os_path_spec. = path_spec_factory.Factoryscip-python python dfvfs 20251019 `dfvfs.path.factory`/Factory#.NewPathSpecscip-python python dfvfs 20251019 `dfvfs.path.factory`/Factory#NewPathSpec().( |
| 25 | definitionsscip-python python dfvfs 20251019 `dfvfs.lib.definitions`/__init__:.TYPE_INDICATOR_OSscip-python python dfvfs 20251019 `dfvfs.lib.definitions`/TYPE_INDICATOR_OS., location=test_path) |
| 26 | |
| 27 | def testNewFileObjectscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileObject().(selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileObject().(self)): |
| 28 | """Tests the NewFileObject function.""" |
| 29 | test_zip_path_spec = path_spec_factory.Factoryscip-python python dfvfs 20251019 `dfvfs.path.factory`/Factory#.NewPathSpecscip-python python dfvfs 20251019 `dfvfs.path.factory`/Factory#NewPathSpec().( |
| 30 | definitionsscip-python python dfvfs 20251019 `dfvfs.lib.definitions`/__init__:.TYPE_INDICATOR_ZIPscip-python python dfvfs 20251019 `dfvfs.lib.definitions`/TYPE_INDICATOR_ZIP., location='/', |
| 31 | parent=selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileObject().(self)._os_path_specscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#_os_path_spec.) |
| 32 | |
| 33 | resolver_helper_object = zip_resolver_helperscip-python python dfvfs 20251019 `dfvfs.resolver_helpers.zip_resolver_helper`/__init__:.ZipResolverHelperscip-python python dfvfs 20251019 `dfvfs.resolver_helpers.zip_resolver_helper`/ZipResolverHelper#() |
| 34 | selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileObject().(self)._TestNewFileObjectscip-python python dfvfs 20251019 `tests.resolver_helpers.test_lib`/ResolverHelperTestCase#_TestNewFileObject().(resolver_helper_object, test_zip_path_spec) |
| 35 | |
| 36 | def testNewFileSystemscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileSystem().(selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileSystem().(self)): |
| 37 | """Tests the NewFileSystem function.""" |
| 38 | test_zip_path_spec = path_spec_factory.Factoryscip-python python dfvfs 20251019 `dfvfs.path.factory`/Factory#.NewPathSpecscip-python python dfvfs 20251019 `dfvfs.path.factory`/Factory#NewPathSpec().( |
| 39 | definitionsscip-python python dfvfs 20251019 `dfvfs.lib.definitions`/__init__:.TYPE_INDICATOR_ZIPscip-python python dfvfs 20251019 `dfvfs.lib.definitions`/TYPE_INDICATOR_ZIP., location='/', |
| 40 | parent=selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileSystem().(self)._os_path_specscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#_os_path_spec.) |
| 41 | |
| 42 | resolver_helper_object = zip_resolver_helperscip-python python dfvfs 20251019 `dfvfs.resolver_helpers.zip_resolver_helper`/__init__:.ZipResolverHelperscip-python python dfvfs 20251019 `dfvfs.resolver_helpers.zip_resolver_helper`/ZipResolverHelper#() |
| 43 | selfscip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ZipResolverHelperTest#testNewFileSystem().(self)._TestNewFileSystemscip-python python dfvfs 20251019 `tests.resolver_helpers.test_lib`/ResolverHelperTestCase#_TestNewFileSystem().(resolver_helper_object, test_zip_path_spec) |
| 44 | |
| 45 | |
| 46 | if __name__scip-python python dfvfs 20251019 `tests.resolver_helpers.zip_resolver_helper`/ == '__main__': |
| 47 | unittestscip-python python python-stdlib 3.11 unittest/__init__:.mainscip-python python dfvfs 20251019 main/__init__:() |