Skip to content

Commit fe4961a

Browse files
authored
Modernize the skipped test_issue_9765 regression test (#12468)
* 🚑 Explicitly set encoding @ `subprocess.run()` This invocation is present in the `test_issue_9765` regression test that is always skipped unconditionally, resulting in the `EncodingWarning` never manifesting itself in CI or development environments of the contributors. * Change `setup.py` call w/ `pip install` @ tests Using this CLI interface has been deprecated in `setuptools` [[1]]. [1]: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
1 parent 80b7657 commit fe4961a

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

testing/acceptance_test.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,14 +1464,21 @@ def my_fixture(self, request):
14641464
}
14651465
)
14661466

1467-
subprocess.run([sys.executable, "setup.py", "develop"], check=True)
1467+
subprocess.run(
1468+
[sys.executable, "-Im", "pip", "install", "-e", "."],
1469+
check=True,
1470+
)
14681471
try:
14691472
# We are using subprocess.run rather than pytester.run on purpose.
14701473
# pytester.run is adding the current directory to PYTHONPATH which avoids
14711474
# the bug. We also use pytest rather than python -m pytest for the same
14721475
# PYTHONPATH reason.
14731476
subprocess.run(
1474-
["pytest", "my_package"], capture_output=True, check=True, text=True
1477+
["pytest", "my_package"],
1478+
capture_output=True,
1479+
check=True,
1480+
encoding="utf-8",
1481+
text=True,
14751482
)
14761483
except subprocess.CalledProcessError as exc:
14771484
raise AssertionError(

0 commit comments

Comments
 (0)