Skip to content

Autotester assigns full PyTA marks to code with syntax errors #583

@hhc97

Description

@hhc97

Markus setup:

Image

Example code:

    def __contains__(self, item: Any) -> bool:
        """Return whether <item> is in this list.

        Use == to compare items.

        >>> lst = three_items(1, 2, 3)
        >>> 2 in lst                     # Equivalent to lst.__contains__(2)
        True
        >>> 4 in lst
        False
        """
       current = self._first

        while current is not None:

            if current.item == item:

                return True

            current = current.next

        return False

The above code has a syntax error (see indentation of thecurrent = self._first line). When running the code, python returns this error:

  File "prep5.py", line 100
    current = self._first
                         ^
IndentationError: unindent does not match any outer indentation level

However, PyTA returns full marks for this file as seen below:

Image

After speaking with @david-yz-liu, I believe this is not intended behavior.

Metadata

Metadata

Assignees

No one assigned

    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