eoio.utils.tests.test_read_utils.TestReadUtils#
- class eoio.utils.tests.test_read_utils.TestReadUtils(methodName='runTest')[source]#
- __init__(methodName='runTest')#
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
Methods
Create an instance of the class that will use the named test method when executed.
Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
Add a function, with arguments, to be called when the test is completed.
Add a type specific assertEqual style function to compare a type.
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the difference between the two objects is more than the given delta.
Asserts that two iterables have the same elements, the same number of times, without regard to order.
Fail if the two objects are unequal as determined by the '==' operator.
Check that the expression is false.
Just like self.assertTrue(a > b), but with a nicer default message.
Just like self.assertTrue(a >= b), but with a nicer default message.
Just like self.assertTrue(a in b), but with a nicer default message.
Just like self.assertTrue(a is b), but with a nicer default message.
Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.
Same as self.assertTrue(obj is None), with a nicer default message.
Just like self.assertTrue(a is not b), but with a nicer default message.
Included for symmetry with assertIsNone.
Just like self.assertTrue(a < b), but with a nicer default message.
Just like self.assertTrue(a <= b), but with a nicer default message.
A list-specific equality assertion.
Fail unless a log message of level level or higher is emitted on logger_name or its children.
Assert that two multi-line strings are equal.
Fail unless no log messages of level level or higher are emitted on logger_name or its children.
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the difference between the two objects is less than the given delta.
Fail if the two objects are equal as determined by the '!=' operator.
Just like self.assertTrue(a not in b), but with a nicer default message.
Included for symmetry with assertIsInstance.
Fail the test if the text matches the regular expression.
Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
Asserts that the message in a raised exception matches a regex.
Fail the test unless the text matches the regular expression.
An equality assertion for ordered sequences (like lists and tuples).
A set-specific equality assertion.
Check that the expression is true.
A tuple-specific equality assertion.
Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
Asserts that the message in a triggered warning matches a regexp.
Run the test without collecting errors in a TestResult
Execute all class cleanup functions.
Execute all cleanup functions.
Same as enterContext, but class-wide.
Enters the supplied context manager.
Fail immediately, with the given message.
Hook method for setting up the test fixture before exercising it.
Hook method for setting up class fixture before running tests in the class.
Returns a one-line description of the test, or None if no description has been provided.
Skip this test.
Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
Hook method for deconstructing the test fixture after testing it.
Hook method for deconstructing the class fixture after running all tests in the class.
test_extract_file_exists_but_incomplete_removes_and_reextractsA path_extracted that exists but doesn't match the archive (an interrupted previous extraction) must be removed and re-extracted from scratch, not trusted.
test_extract_file_exists_reader_without_save_extracted_supportRegression test: extract_file() used to unconditionally set read_params["save_extracted"] = True whenever a product was already extracted, regardless of whether the resolved reader even has a save_extracted concept (e.g. RadCalNet's ascii-based reader doesn't).
test_extract_zipped_file_non_wrapping_zip_creates_path_extractedA zip that mixes loose top-level files with a differently-named folder (a real GISTDA THEOS delivery's shape: README/PDF/LOGO alongside one product-id-named folder, not the outer order-derived zip filename) gets path_extracted created and every member's own relative path placed inside it -- regression test for the "files scattered into the zip's parent directory instead of into path_extracted" bug.
test_extract_zipped_file_self_wrapping_zip_extracts_to_parentA zip whose one top-level entry already matches path_extracted's own name (e.g. a real Sentinel-2 delivery zip's members, all prefixed "<product>.SAFE/...") extracts relative to its parent directory -- the zip's own folder becomes path_extracted with nothing extra created.
Attributes