Skip to content

Can't input single newline to process under test #39

@aivarannamaa

Description

@aivarannamaa

When my demo_solution.py is

input()

and demo_tester.py is

from grader import *

@test
def do_test(m):
    m.stdin.put("")

Then python -m grader demo_tester.py demo_solution.py gives me

{
    "success": true,
    "results": [
        {
            "traceback": "Traceback (most recent call last):\n  File \"C:\\Python34\\lib\\site-packages\\grader-0.0.1-py3.4.egg\\grader\\execution_base.py\", line 63, in call_test_function\n    **pre_hook_info[\"extra_kwargs\"]\n  File \"C:\\Python34\\lib\\site-packages\\grader-0.0.1-py3.4.egg\\grader\\core.py\", line 48, in wrapper\n    raise module.caughtException\n  File \"C:\\Python34\\lib\\site-packages\\grader-0.0.1-py3.4.egg\\grader\\program_container.py\", line 38, in run\n    self._exec_code()\n  File \"C:\\Python34\\lib\\site-packages\\grader-0.0.1-py3.4.egg\\grader\\program_container.py\", line 53, in _exec_code\n    exec(code, mod.__dict__)\n  File \"<tested-program>\", line 1, in <module>\nEOFError: EOF when reading a line\n",
            "description": "do_test",
            "error_message": "EOFError: EOF when reading a line",
            "log": [],
            "time": "0.212",
            "success": false
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions