(f)
| 69 | |
| 70 | |
| 71 | def eval_formatter_no_slicing_check(f): |
| 72 | ns = dict(n=12, pi=math.pi, stuff="hello there", os=os) |
| 73 | |
| 74 | s = f.format("{n:x} {pi**2:+f}", **ns) |
| 75 | assert s == "c +9.869604" |
| 76 | |
| 77 | s = f.format("{stuff[slice(1,4)]}", **ns) |
| 78 | assert s == "ell" |
| 79 | |
| 80 | s = f.format("{a[:]}", a=[1, 2]) |
| 81 | assert s == "[1, 2]" |
| 82 | |
| 83 | |
| 84 | def test_eval_formatter(): |
no test coverage detected
searching dependent graphs…