Python Forum
A bug in my school's autograder
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A bug in my school's autograder
#1
class A:
def __init__(self, a):
self.a = a
def __eq__(self, other):
return True

def aptx(a):
return A(a)


Sorry I don't know how to keep the indentation. I didn't think of this bug myself, a friend did. Basically my school only uses "assert func(a) == b" as test cases, and no one checks the code manually at all. As a result code in above format can pass all cases no matter what, without doing any real job.
If there's anyone who works at an educational institution here, please be careful with the possible exploitation of your testing method (never underestimate people, even first years) and at least carry out spot checks manually on students' code.
Reply
#2
To preserve indentation, click insert code icon (in toolbar) and paste code between tags.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Subtle Bug I really don't see in Autograder: Exercise 3.1 benante3 5 2,825 Dec-21-2020, 11:04 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020