Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@check50.check()
def prints_hello_name_non_chaining():
"""prints hello name (non chaining)"""
check50.run("python3 foo.py").stdin("bar\nbaz").stdout("hello bar").stdout("hello baz")
@check50.check()
def prints_hello_name_non_chaining_prompt():
"""prints hello name (non chaining) (prompt)"""
check50.run("python3 foo.py").stdin("bar\nbaz", prompt=True).stdout("hello bar").stdout("hello baz")
@check50.check()
@check50.hidden("foo")
def check():
check50.log("AHHHHHHHHHHHHHHHHHHH")
raise check50.Failure("AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH")
@check()
def exists(self):
"""application.c exists."""
super(Finance, self).exists("application.py")
@check50.check(compiles)
def valgrind_hello():
"""valgrinding "hello, world\\n" """
check50.c.valgrind("./hello").stdin("david").stdout("[H|h]ello, david!?")
@check50.check()
def exists():
"""hello.c exists"""
check50.exists("hello.c")
@check("compiles")
def test_reject_foo(self):
"""rejects a non-numeric height of "foo" """
self.spawn("./mario").stdin("foo").reject()
@check()
def exists(self):
"""mario.c exists."""
super(MarioMore, self).exists("mario.c")
self.include("0.txt", "1.txt", "2.txt", "23.txt")
@check("compiles")
def test_reject_empty(self):
"""rejects a non-numeric height of "" """
self.spawn("./mario").stdin("").reject()