From 4b84d15732c0f9245a2d44720a3b6c587f9d4f1a Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Thu, 9 Mar 2023 20:17:19 +0000
Subject: [PATCH] TEST: Sanity check test that just tries to import every
 module

---
 bip/tests/test_import_all.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 bip/tests/test_import_all.py

diff --git a/bip/tests/test_import_all.py b/bip/tests/test_import_all.py
new file mode 100644
index 0000000..dde12ee
--- /dev/null
+++ b/bip/tests/test_import_all.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+
+
+import pkgutil
+import importlib
+import bip
+
+
+def test_importall():
+
+    def recurse(module):
+
+        path    = module.__path__
+        name    = module.__name__
+        submods = list(pkgutil.iter_modules(path, f'{name}.'))
+
+        for i, (spath, smodname, ispkg) in enumerate(submods):
+
+            submod = importlib.import_module(smodname)
+
+            if ispkg:
+                recurse(submod)
+
+    recurse(bip)
-- 
GitLab