mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
debug.sysinfo: tests and coverage
This commit is contained in:
parent
e367b88195
commit
5b9f07c81c
@ -12,15 +12,18 @@ def sysinfo():
|
||||
"Platform: %s"%platform.platform(),
|
||||
]
|
||||
d = platform.linux_distribution()
|
||||
if d[0]:
|
||||
data.append("Linux distro: %s %s %s"%d)
|
||||
t = "Linux distro: %s %s %s"%d
|
||||
if d[0]: # pragma: no-cover
|
||||
data.append(t)
|
||||
|
||||
d = platform.mac_ver()
|
||||
if d[0]:
|
||||
data.append("Mac version: %s %s %s"%d)
|
||||
t = "Mac version: %s %s %s"%d
|
||||
if d[0]: # pragma: no-cover
|
||||
data.append(t)
|
||||
|
||||
d = platform.win32_ver()
|
||||
if d[0]:
|
||||
data.append("Windows version: %s %s %s %s"%d)
|
||||
t = "Windows version: %s %s %s %s"%d
|
||||
if d[0]: # pragma: no-cover
|
||||
data.append(t)
|
||||
|
||||
return "\n".join(data)
|
||||
|
6
test/netlib/test_debug.py
Normal file
6
test/netlib/test_debug.py
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
from netlib import debug
|
||||
|
||||
|
||||
def test_sysinfo():
|
||||
assert debug.sysinfo()
|
Loading…
Reference in New Issue
Block a user