mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Add sys.{executable,base_prefix,prefix} to features.pilinfo
This commit is contained in:
parent
5b20811cab
commit
ab9dfd8181
|
@ -129,9 +129,15 @@ def test_pilinfo() -> None:
|
|||
while lines[0].startswith(" "):
|
||||
lines = lines[1:]
|
||||
assert lines[0] == "-" * 68
|
||||
assert lines[1].startswith("Python modules loaded from ")
|
||||
assert lines[2].startswith("Binary modules loaded from ")
|
||||
assert lines[3] == "-" * 68
|
||||
assert lines[1].startswith("Python executable is")
|
||||
lines = lines[2:]
|
||||
if lines[0].startswith("Environment Python files loaded from"):
|
||||
lines = lines[1:]
|
||||
assert lines[0].startswith("System Python files loaded from")
|
||||
assert lines[1] == "-" * 68
|
||||
assert lines[2].startswith("Python Pillow modules loaded from ")
|
||||
assert lines[3].startswith("Binary Pillow modules loaded from ")
|
||||
assert lines[4] == "-" * 68
|
||||
jpeg = (
|
||||
"\n"
|
||||
+ "-" * 68
|
||||
|
|
|
@ -15,9 +15,15 @@ def test_main() -> None:
|
|||
while lines[0].startswith(" "):
|
||||
lines = lines[1:]
|
||||
assert lines[0] == "-" * 68
|
||||
assert lines[1].startswith("Python modules loaded from ")
|
||||
assert lines[2].startswith("Binary modules loaded from ")
|
||||
assert lines[3] == "-" * 68
|
||||
assert lines[1].startswith("Python executable is")
|
||||
lines = lines[2:]
|
||||
if lines[0].startswith("Environment Python files loaded from"):
|
||||
lines = lines[1:]
|
||||
assert lines[0].startswith("System Python files loaded from")
|
||||
assert lines[1] == "-" * 68
|
||||
assert lines[2].startswith("Python Pillow modules loaded from ")
|
||||
assert lines[3].startswith("Binary Pillow modules loaded from ")
|
||||
assert lines[4] == "-" * 68
|
||||
jpeg = (
|
||||
os.linesep
|
||||
+ "-" * 68
|
||||
|
|
|
@ -249,12 +249,17 @@ def pilinfo(out=None, supported_formats=True):
|
|||
for py_version in py_version[1:]:
|
||||
print(f" {py_version.strip()}", file=out)
|
||||
print("-" * 68, file=out)
|
||||
print(f"Python executable is {sys.executable or 'unknown'}", file=out)
|
||||
if sys.prefix != sys.base_prefix:
|
||||
print(f"Environment Python files loaded from {sys.prefix}", file=out)
|
||||
print(f"System Python files loaded from {sys.base_prefix}", file=out)
|
||||
print("-" * 68, file=out)
|
||||
print(
|
||||
f"Python modules loaded from {os.path.dirname(Image.__file__)}",
|
||||
f"Python Pillow modules loaded from {os.path.dirname(Image.__file__)}",
|
||||
file=out,
|
||||
)
|
||||
print(
|
||||
f"Binary modules loaded from {os.path.dirname(Image.core.__file__)}",
|
||||
f"Binary Pillow modules loaded from {os.path.dirname(Image.core.__file__)}",
|
||||
file=out,
|
||||
)
|
||||
print("-" * 68, file=out)
|
||||
|
|
Loading…
Reference in New Issue
Block a user