MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / test

Method test

pager_lib/getmac/getmac.py:536–540  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

534 method_type = "ip4"
535
536 def test(self): # type: () -> bool
537 # NOTE: specifying "arp.exe" instead of "arp" lets this work
538 # seamlessly on WSL1 as well. On WSL2 it doesn't matter, since
539 # it's basically just a Linux VM with some lipstick.
540 return check_command("arp.exe")
541
542 def get(self, arg): # type: (str) -> Optional[str]
543 return _search(MAC_RE_DASH, _popen("arp.exe", "-a %s" % arg))

Callers

nothing calls this directly

Calls 1

check_commandFunction · 0.85

Tested by

no test coverage detected