mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +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(),
|
"Platform: %s"%platform.platform(),
|
||||||
]
|
]
|
||||||
d = platform.linux_distribution()
|
d = platform.linux_distribution()
|
||||||
if d[0]:
|
t = "Linux distro: %s %s %s"%d
|
||||||
data.append("Linux distro: %s %s %s"%d)
|
if d[0]: # pragma: no-cover
|
||||||
|
data.append(t)
|
||||||
|
|
||||||
d = platform.mac_ver()
|
d = platform.mac_ver()
|
||||||
if d[0]:
|
t = "Mac version: %s %s %s"%d
|
||||||
data.append("Mac version: %s %s %s"%d)
|
if d[0]: # pragma: no-cover
|
||||||
|
data.append(t)
|
||||||
|
|
||||||
d = platform.win32_ver()
|
d = platform.win32_ver()
|
||||||
if d[0]:
|
t = "Windows version: %s %s %s %s"%d
|
||||||
data.append("Windows version: %s %s %s %s"%d)
|
if d[0]: # pragma: no-cover
|
||||||
|
data.append(t)
|
||||||
|
|
||||||
return "\n".join(data)
|
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