diff options
| author | Scott Gasch <[email protected]> | 2022-02-05 14:09:59 -0800 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-02-05 14:09:59 -0800 |
| commit | d2376b4dd7a8bba0dfc878578086faeab83c6f5b (patch) | |
| tree | 59dd681c75f33bef9d7a38a0a7220e38ff343aa9 /misc_utils.py | |
| parent | 19ca9f7213d41111b22147908e17bd3ead306945 (diff) | |
Add doctest to misc_utils.
Diffstat (limited to 'misc_utils.py')
| -rw-r--r-- | misc_utils.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/misc_utils.py b/misc_utils.py index fc1d5c2..4979a3c 100644 --- a/misc_utils.py +++ b/misc_utils.py @@ -4,5 +4,15 @@ import os def is_running_as_root() -> bool: - """Returns True if running as root.""" + """Returns True if running as root. + + >>> is_running_as_root() + False + """ return os.geteuid() == 0 + + +if __name__ == '__main__': + import doctest + + doctest.testmod() |
