()
| 97 | |
| 98 | |
| 99 | def test_dollar_formatter(): |
| 100 | f = text.DollarFormatter() |
| 101 | eval_formatter_check(f) |
| 102 | eval_formatter_slicing_check(f) |
| 103 | |
| 104 | ns = dict(n=12, pi=math.pi, stuff="hello there", os=os) |
| 105 | s = f.format("$n", **ns) |
| 106 | assert s == "12" |
| 107 | s = f.format("$n.real", **ns) |
| 108 | assert s == "12" |
| 109 | s = f.format("$n/{stuff[:5]}", **ns) |
| 110 | assert s == "12/hello" |
| 111 | s = f.format("$n $$HOME", **ns) |
| 112 | assert s == "12 $HOME" |
| 113 | s = f.format("${foo}", foo="HOME") |
| 114 | assert s == "$HOME" |
| 115 | |
| 116 | |
| 117 | def test_strip_email(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…