bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864)
(cherry picked from commit 91cb298f811961277fd4cc4a32211899d48bedcb)
Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
diff --git a/Lib/test/inspect_fodder.py b/Lib/test/inspect_fodder.py
index 711bada..ff3f0e4 100644
--- a/Lib/test/inspect_fodder.py
+++ b/Lib/test/inspect_fodder.py
@@ -74,3 +74,9 @@
async def lobbest(grenade):
pass
+
+currentframe = inspect.currentframe()
+try:
+ raise Exception()
+except:
+ tb = sys.exc_info()[2]