Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / misc_utils.py
index a4757bd3a0f6b37a1111b320ec907c9aea5f6592..f844f721bdacd5741719c1719593e09fd2d69036 100644 (file)
@@ -1,6 +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.
+
+    >>> is_running_as_root()
+    False
+    """
     return os.geteuid() == 0
+
+
+if __name__ == '__main__':
+    import doctest
+
+    doctest.testmod()