Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / misc_utils.py
index fc1d5c28e86c5201ec25a800c93f4ce749578402..f844f721bdacd5741719c1719593e09fd2d69036 100644 (file)
@@ -1,8 +1,22 @@
 #!/usr/bin/env python3
 
+# © Copyright 2021-2022, Scott Gasch
+
+"""Miscellaneous utilities."""
+
 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()