bpo-42116: Fix inspect.getsource handling of trailing comments (GH-23630)
diff --git a/Lib/test/inspect_fodder.py b/Lib/test/inspect_fodder.py
index 96a0257..e1287a3 100644
--- a/Lib/test/inspect_fodder.py
+++ b/Lib/test/inspect_fodder.py
@@ -91,3 +91,25 @@ def as_method_of(self, obj):
custom_method = Callable().as_method_of(42)
del Callable
+
+# line 95
+class WhichComments:
+ # line 97
+ # before f
+ def f(self):
+ # line 100
+ # start f
+ return 1
+ # line 103
+ # end f
+ # line 105
+ # after f
+
+ # before asyncf - line 108
+ async def asyncf(self):
+ # start asyncf
+ return 2
+ # end asyncf
+ # after asyncf - line 113
+ # end of WhichComments - line 114
+ # after WhichComments - line 115