Skip to content

Commit

Permalink
Allow error reporting for YAML tests (#7125)
Browse files Browse the repository at this point in the history
Allow error reporting for YAML tests
  • Loading branch information
pradyunsg authored Oct 2, 2019
2 parents e3f9a72 + 64262aa commit 2ac112d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions tests/functional/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = []
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion tests/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
""",
Expand Down

0 comments on commit 2ac112d

Please sign in to comment.