Coverage for gitman/system.py : 85%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""Interface to the operating system."""
"""Open a file with its default program.""" 'Windows': _launch_windows, 'Darwin': _launch_mac, 'Linux': _launch_linux, }[name] except KeyError: raise RuntimeError("Unrecognized platform: {}".format(name)) from None else:
def _launch_windows(path): # pragma: no cover (manual test) os.startfile(path) # pylint: disable=no-member return True
def _launch_mac(path): # pragma: no cover (manual test) return subprocess.call(['open', path]) == 0
def _launch_linux(path): # pragma: no cover (manual test) return subprocess.call(['xdg-open', path]) == 0 |