Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pazz opened this issue Apr 24, 2021 · 1 comment
Assignees

Comments

@pazz
Copy link
Contributor

pazz commented Apr 24, 2021

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

@pazz
Copy link
Contributor Author

pazz commented Apr 24, 2021

Sorry: the command X does not produce the empty string but it does not terminate. Still, this should raise something that is documented. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants