()
| 245 | |
| 246 | |
| 247 | def test_getfuncsource_dynamic() -> None: |
| 248 | def f(): |
| 249 | raise NotImplementedError() |
| 250 | |
| 251 | def g(): |
| 252 | pass # pragma: no cover |
| 253 | |
| 254 | f_source = Source(f) |
| 255 | g_source = Source(g) |
| 256 | assert str(f_source).strip() == "def f():\n raise NotImplementedError()" |
| 257 | assert str(g_source).strip() == "def g():\n pass # pragma: no cover" |
| 258 | |
| 259 | |
| 260 | def test_getfuncsource_with_multine_string() -> None: |