Skip to content

Commit

Permalink
Make tests easier to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Mar 13, 2024
1 parent d975362 commit 7dce611
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,32 @@ def install(self, *args):
)

def wheel(self, package_dir, *args):
return subprocess.run(
[
self.executable,
"-m",
"pip",
"wheel",
"--disable-pip-version-check",
"--no-deps",
"--wheel-dir",
package_dir,
"--find-links",
str(self.wheelhouse),
"--cache-dir",
self.cache_dir,
package_dir,
*args,
],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
check=True,
)
try:
return subprocess.run(
[
self.executable,
"-m",
"pip",
"wheel",
"--disable-pip-version-check",
"--no-deps",
"--wheel-dir",
package_dir,
"--find-links",
str(self.wheelhouse),
"--cache-dir",
self.cache_dir,
package_dir,
*args,
],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
check=True,
)
except subprocess.CalledProcessError as e:
print("Subprocess failed with output:")
print(e.stdout.decode("utf-8"))
raise


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 7dce611

Please sign in to comment.