-
-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow editable packages in requirements.in with --generate-hashes
- Loading branch information
Showing
3 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,3 +315,26 @@ def test_upgrade_packages_option(tmpdir): | |
assert out.exit_code == 0 | ||
assert 'small-fake-a==0.1' in out.output | ||
assert 'small-fake-b==0.2' in out.output | ||
|
||
|
||
def test_generate_hashes_with_editable(): | ||
runner = CliRunner() | ||
with runner.isolated_filesystem(): | ||
with open('requirements.in', 'w') as fp: | ||
fp.write('-e git+https://github.com/django/[email protected]#egg=django\n') | ||
fp.write('pytz==2017.2\n') | ||
out = runner.invoke(cli, ['--generate-hashes']) | ||
expected = ( | ||
'#\n' | ||
'# This file is autogenerated by pip-compile\n' | ||
'# To update, run:\n' | ||
'#\n' | ||
'# pip-compile --generate-hashes --output-file requirements.txt requirements.in\n' | ||
'#\n' | ||
'-e git+https://github.com/django/[email protected]#egg=django\n' | ||
'pytz==2017.2 \\\n' | ||
' --hash=sha256:d1d6729c85acea5423671382868627129432fba9a89ecbb248d8d1c7a9f01c67 \\\n' | ||
' --hash=sha256:f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589\n' | ||
) | ||
assert out.exit_code == 0 | ||
assert expected in out.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters