Conditions | 1 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
8 | def test_clean_input(monkeypatch): |
||
9 | monkeypatch.setattr("sys.stdin", StringIO(" left SPACE\n")) |
||
10 | assert clean_input(PROMPT) == "left space" |
||
11 | |||
12 | monkeypatch.setattr("sys.stdin", StringIO("RIGHT space \n")) |
||
13 | assert clean_input(PROMPT) == "right space" |
||
14 | |||
15 | monkeypatch.setattr("sys.stdin", StringIO(" SURROUNDING SPACE \n")) |
||
16 | assert clean_input(PROMPT) == "surrounding space" |
||
17 |