How to use the johnnydep.compat.quote function in johnnydep

To help you get started, we’ve selected a few johnnydep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wimglenn / johnnydep / tests / test_gen.py View on Github external
def test_build_from_sdist(add_to_index):
    sdist_fname = os.path.join(here, "copyingmock-0.2.tar.gz")
    fragment = "#md5=9aa6ba13542d25e527fe358d53cdaf3b"
    add_to_index(name="copyingmock", path=sdist_fname, urlfragment=fragment)
    dist = JohnnyDist("copyingmock")
    assert dist.name == "copyingmock"
    assert dist.summary == "A subclass of MagicMock that copies the arguments"
    assert dist.required_by == []
    assert dist.import_names == ["copyingmock"]
    assert dist.homepage == "https://github.com/wimglenn/copyingmock"
    assert dist.extras_available == []
    assert dist.extras_requested == []
    assert dist.project_name == "copyingmock"
    assert dist.download_link == "file://{}".format(quote(sdist_fname))
    assert dist.checksum == "md5=9aa6ba13542d25e527fe358d53cdaf3b"