| 39 |
| 40 |
| 41 |
| 42 |
| 43 |
| 44 |
| 45 |
| 46 |
| 47 |
| 48 |
| 49 |
| 50 |
| 51 |
| 52 |
| 53 | |
def test_source_putaround_simple(): |
source = Source("raise ValueError") |
source = source.putaround( |
"try:", """\ |
except ValueError: |
x = 42 |
else: |
-> x = 23""") |
assert str(source)=="""\ |
try: |
raise ValueError |
except ValueError: |
x = 42 |
else: |
x = 23""" | |