def test_http_link(self):
     link = Link(
         'https://pypi.python.org/packages/source/p/pip/pip-7.0.3.tar.gz'
         '#md5=e972d691ff6779ffb4b594449bac3e43')
     assert link_to_nix(link) == (
         'fetchurl {\n'
         '  url = "https://pypi.python.org/packages/source/p/pip/pip-7.0.3.tar.gz";\n'
         '  md5 = "e972d691ff6779ffb4b594449bac3e43";\n'
         '}')
Exemple #2
0
 def test_http_link(self):
     link = Link(
         'https://pypi.python.org/packages/source/p/pip/pip-7.0.3.tar.gz'
         '#md5=e972d691ff6779ffb4b594449bac3e43')
     assert link_to_nix(link) == (
         'fetchurl {\n'
         '  url = "https://pypi.python.org/packages/source/p/pip/pip-7.0.3.tar.gz";\n'
         '  sha256 = "1zdgl0qsgsh71b397120y7vw3rkbisrgws2rqv5c4vbgba19iidl";\n'
         '}')
 def test_file_link(self, cwd, tmpdir):
     os.chdir(str(tmpdir))
     assert link_to_nix(Link('file://{}'.format(tmpdir))) == './.'