| 25 | |
| 26 | |
| 27 | class MockPythonLines(object): |
| 28 | |
| 29 | NORMAL = textwrap.dedent( |
| 30 | r"""\ |
| 31 | if [ "$1" = "-V" ]; then |
| 32 | echo "Mock Python 3.xyz!" |
| 33 | else |
| 34 | echo "I am mock Python!" |
| 35 | fi |
| 36 | """ |
| 37 | ).split("\n") |
| 38 | |
| 39 | FAIL = textwrap.dedent(r"""\ |
| 40 | echo "Mock failure!" |
| 41 | exit 1 |
| 42 | """).split("\n") |
| 43 | |
| 44 | VERSION_ERROR = textwrap.dedent(r"""\ |
| 45 | if [ "$1" = "-V" ]; then |
| 46 | echo "Error!" |
| 47 | exit 1 |
| 48 | else |
| 49 | echo "I am mock Python!" |
| 50 | fi |
| 51 | """).split("\n") |
| 52 | |
| 53 | |
| 54 | # TODO(brandjon): Move this test to PY3. Blocked (ironically!) on the fix for |