1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Allow error reporting for YAML tests (#7125)

Allow error reporting for YAML tests
This commit is contained in:
Pradyun Gedam 2019-10-02 10:39:09 +05:30 committed by GitHub
commit 2ac112d046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -56,10 +56,14 @@ def handle_install_request(script, requirement):
result = script.pip(
"install",
"--no-index", "--find-links", path_to_url(script.scratch_path),
requirement
requirement, "--verbose",
allow_stderr_error=True,
allow_stderr_warning=True,
)
retval = {}
retval = {
"_result_object": result,
}
if result.returncode == 0:
# Check which packages got installed
retval["install"] = []
@ -140,4 +144,7 @@ def test_yaml_based(script, case):
# Perform the requested action
effect = available_actions[action](script, request[action])
assert effect == expected, "Fixture did not succeed."
result = effect["_result_object"]
del effect["_result_object"]
assert effect == expected, str(result)

View file

@ -924,7 +924,7 @@ def create_basic_wheel_for_package(script, name, version,
extras = {}
files = {
"{name}/__init__.py": """
__version__ = {version}
__version__ = {version!r}
def hello():
return "Hello From {name}"
""",