Skip to content

Commit

Permalink
Disable coverage for impossible cases
Browse files Browse the repository at this point in the history
repo_management/operations.py:
Do not try to cover the cases, that coveragepy is not able to cover
(e.g. async for loops with awaitables).
Upstream coveragepy seems to still have issues coverying different kinds
of concurrency techniques:
nedbat/coveragepy#1012
  • Loading branch information
dvzrv committed Apr 9, 2021
1 parent 6f8cf75 commit b51be11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo_management/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def db_file_as_models(
packages: Dict[str, models.OutputPackageBase] = {}
package_descs: Dict[str, models.PackageDesc] = {}
package_files: Dict[str, models.Files] = {}
async for member in files._db_file_member_as_model(
async for member in files._db_file_member_as_model( # pragma: no cover
db_file=await files._read_db_file(db_path=db_path, compression=compression)
):
if member.member_type == defaults.RepoDbMemberType.DESC:
Expand Down Expand Up @@ -99,7 +99,7 @@ async def create_db_from_json_files(

repodbfile = convert.RepoDbFile()
database = await files._write_db_file(path=output_path)
async for path in files._json_files_in_directory(path=input_path):
async for path in files._json_files_in_directory(path=input_path): # pragma: no cover
model = await files._read_pkgbase_json_file(path)
await files._stream_package_base_to_db(
db=database,
Expand Down

0 comments on commit b51be11

Please sign in to comment.