Visitar URL original
check_function: way to test if arguments are NOT specified · Issue #271 · datacamp/pythonwhat · GitHub
Skip to content

check_function: way to test if arguments are NOT specified #271

Open

Description

@filipsch

With check_function() and check_args(), it is possible whether some arguments are specified, and whether they are correct (with has_equal_ast()), but it is not possible to check if some arguments are not specified. There is test_not() functionality, but this will not work in the current implementation: if certain arguments are not found in the solution, an exception is thrown and the SCT execution errors out.

To improve this, we could adopt a TestFailSolution exception, that is thrown every time we're trying to access e.g. an argument that is also not in the solution. This error is actually thrown if we're not in test_not() mode (the SCT was incorrectly written), and that is swallowed if we are in test_not() mode (the SCT did this on purpose).

cc @yashasroy

Activity

  1. self-assigned this
    on Jun 8, 2018
  2. removed their assignment
    on Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions