+
Skip to content

unexpected failure type for check50.run("X")..stdout("lala") if X returns empty string #256

Closed
@pazz

Description

@pazz

I have a check that calls run and stdout like this:

def mas_check_stuff():
    check50_java.run("some command").stdout("expected)

and check50 produces a json report like this:

        {
            "name": "mas_check_stuff",
            "description": "bla",
            "passed": false,
            "log": [
                "running some command",
            ],
            "cause": {
                "rationale": "Did not find \"expected\"",
                "help": null,
                "missing_item": "expected",
                "collection": ""
            },
            "data": {},

        },

Here, the student's submission actually produced the empty string.
It looks like check50.run().stdout() produces a check50.Missing exception. But that is not documented like this!
I am expecting a Mismatch for further processing..

https://cs50.readthedocs.io/projects/check50/en/latest/api/#check50.run.stdout

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载