Add doctest to misc_utils.
authorScott Gasch <[email protected]>
Sat, 5 Feb 2022 22:09:59 +0000 (14:09 -0800)
committerScott Gasch <[email protected]>
Sat, 5 Feb 2022 22:09:59 +0000 (14:09 -0800)
misc_utils.py

index fc1d5c28e86c5201ec25a800c93f4ce749578402..4979a3c65bcb377b813b18868962297f80b0bd1d 100644 (file)
@@ -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()