def test_inner_package(err, package): """Tests a package's inner content.""" # Iterate through each tier. for tier in sorted(testcases._get_tiers()): # Let the error bundler know what tier we're on. err.set_tier(tier) # Iterate through each test of our detected type. for test in testcases._get_tests(tier): test_func = test["test"] if test["simple"]: test_func(err) else: # Pass in: # - Error Bundler # - A copy of the package itself test_func(err, package) # Return any errors at the end of the tier if undetermined. if err.failed(fail_on_warnings=False) and not err.determined: err.unfinished = True err.discard_unused_messages(ending_tier=tier) return err # Return the results. return err
def test_inner_package(err, package): """Tests a package's inner content.""" # Iterate through each tier. for tier in sorted(testcases._get_tiers()): # Let the error bundler know what tier we're on. err.set_tier(tier) # Iterate through each test of our detected type. for test in testcases._get_tests(tier): test(err, package) # Return any errors at the end of the tier if undetermined. if err.failed(fail_on_warnings=False) and not err.determined: err.unfinished = True err.discard_unused_messages(ending_tier=tier) return err # Return the results. return err
def test_inner_package(err, package): """Tests a package's inner content.""" # Iterate through each tier. for tier in sorted(testcases._get_tiers()): # Let the error bundler know what tier we're on. err.set_tier(tier) # Iterate through each test of our detected type. try: for test in testcases._get_tests(tier): test(err, package) except (BadZipfile, zlib_error): write_zip_error(err) # Return any errors at the end of the tier if undetermined. if err.failed(fail_on_warnings=False) and not err.determined: err.unfinished = True err.discard_unused_messages(ending_tier=tier) return err # Return the results. return err