Skip to content

Add test for handling database corruption error during the component …

Codacy Production / Codacy Static Code Analysis required action Nov 23, 2023 in 0s

4 new issues (0 max.) of at least minor severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 2
- Added 4
           

Complexity increasing per file
==============================
- src/tribler/core/utilities/db_corruption_handling/tests/test_sqlite_replacement.py  5
- src/tribler/core/utilities/db_corruption_handling/base.py  3
- src/tribler/core/utilities/db_corruption_handling/tests/conftest.py  1
- src/tribler/core/utilities/db_corruption_handling/sqlite_replacement.py  2
- src/tribler/core/utilities/db_corruption_handling/tests/test_base.py  4
- src/tribler/core/utilities/tests/test_pony_utils.py  1
- src/tribler/core/components/reporter/exception_handler.py  1
- src/tribler/core/upgrade/db8_to_db10.py  1
- src/tribler/core/utilities/pony_utils.py  2
         

See the complete overview on Codacy

Annotations

Check warning on line 53 in src/tribler/core/components/tests/test_base_component.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

src/tribler/core/components/tests/test_base_component.py#L53

Unused argument 'tribler_config'

Check warning on line 29 in src/tribler/core/utilities/db_corruption_handling/sqlite_replacement.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

src/tribler/core/utilities/db_corruption_handling/sqlite_replacement.py#L29

Redefining name 'method_name' from outer scope (line 48)

Check warning on line 33 in src/tribler/core/utilities/db_corruption_handling/sqlite_replacement.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

src/tribler/core/utilities/db_corruption_handling/sqlite_replacement.py#L33

Access to a protected member _db_filepath of a client class

Check warning on line 40 in src/tribler/core/utilities/db_corruption_handling/tests/test_sqlite_replacement.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

src/tribler/core/utilities/db_corruption_handling/tests/test_sqlite_replacement.py#L40

Attribute '_db_filepath' defined outside __init__