From 617c94e57be011bca6102f32196f5ced4fa2d158 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 18 Feb 2019 02:06:37 +0530 Subject: [PATCH 1/3] Show output in YAML test failures --- tests/functional/test_yaml.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/functional/test_yaml.py b/tests/functional/test_yaml.py index ceac69fd81d..c95bb237f3e 100644 --- a/tests/functional/test_yaml.py +++ b/tests/functional/test_yaml.py @@ -56,10 +56,12 @@ def handle_install_request(script, requirement): result = script.pip( "install", "--no-index", "--find-links", path_to_url(script.scratch_path), - requirement + requirement, "--verbose", ) - retval = {} + retval = { + "_result_object": result, + } if result.returncode == 0: # Check which packages got installed retval["install"] = [] @@ -140,4 +142,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) From b20fd061c4ddc21baafc0ec06412c5e3ef5cf37f Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Tue, 1 Oct 2019 11:24:21 +0530 Subject: [PATCH 2/3] Allow errors in YAML test outputs --- tests/functional/test_yaml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/test_yaml.py b/tests/functional/test_yaml.py index c95bb237f3e..eab11e2a42a 100644 --- a/tests/functional/test_yaml.py +++ b/tests/functional/test_yaml.py @@ -57,6 +57,8 @@ def handle_install_request(script, requirement): "install", "--no-index", "--find-links", path_to_url(script.scratch_path), requirement, "--verbose", + allow_stderr_error=True, + allow_stderr_warning=True, ) retval = { From 64262aacee663b11520c1331c999cc999b111941 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Tue, 1 Oct 2019 11:43:47 +0530 Subject: [PATCH 3/3] Use the `repr` of version strings in wheels. --- tests/lib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py index 576cc6edd7b..6b5b283d05d 100644 --- a/tests/lib/__init__.py +++ b/tests/lib/__init__.py @@ -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}" """,