Verified Commit 675290c7 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Make coverage 100%

Test the last remaining untested code.
parent b98a21dc
Pipeline #12768 passed with stage
in 13 seconds
......@@ -50,6 +50,12 @@ def package(pkg_data, generate_package):
return generate_package(pkg_data)
@pytest.fixture
def package_tmpdir(tmpdir_factory, pkg_data, generate_package):
pkgpath = str(tmpdir_factory.mktemp('pkg'))
return generate_package(pkg_data, pkgpath=pkgpath)
def test_localdb(core_data, localdb):
pkg = core_data[0]
pkgpath = f"{localdb}/local/{pkg['name']}-{pkg['version']}"
......@@ -92,3 +98,9 @@ def test_package(pkg_data, package):
with tarfile.open(package) as tar:
for index, tarinfo in enumerate(tar):
assert tarinfo.name == '.PKGINFO'
def test_package_tmpdir(pkg_data, package_tmpdir):
with tarfile.open(package_tmpdir) as tar:
for index, tarinfo in enumerate(tar):
assert tarinfo.name == '.PKGINFO'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment