Skip to content

Commit

Permalink
Merge pull request #78 from cs50/develop
Browse files Browse the repository at this point in the history
v2.1.1
  • Loading branch information
Kareem Zidane authored Oct 2, 2017
2 parents bd2ed81 + 1aa866a commit 694d1b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.pyc
*.c
*.egg-info
*.pyc
*.sb2
dist
build
__pycache__/
tmp
12 changes: 6 additions & 6 deletions check50.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def addSuccess(self, test):
})

def addError(self, test, err):
test.log.append(err[1])
test.log.append(str(err[1]))
test.log += traceback.format_tb(err[2])
test.log.append("Contact sysadmins@cs50.harvard.edu with the URL of this check!")
self.results.append({
Expand Down Expand Up @@ -452,7 +452,7 @@ def __init__(self, test, child):
self.output = []
self.exitstatus = None

def stdin(self, line, prompt=True, timeout=1):
def stdin(self, line, prompt=True, timeout=3):
if line == EOF:
self.test.log.append("sending EOF...")
else:
Expand All @@ -470,7 +470,7 @@ def stdin(self, line, prompt=True, timeout=1):
self.child.sendline(line)
return self

def stdout(self, output=None, str_output=None, timeout=1):
def stdout(self, output=None, str_output=None, timeout=3):
if output is None:
return self.wait(timeout).output

Expand Down Expand Up @@ -512,7 +512,7 @@ def stdout(self, output=None, str_output=None, timeout=1):

return self

def reject(self, timeout=1):
def reject(self, timeout=3):
self.test.log.append("checking that input was rejected...")
try:
self.child.expect(".+", timeout=timeout)
Expand All @@ -525,7 +525,7 @@ def reject(self, timeout=1):
raise Error("timed out while waiting for input to be rejected")
return self

def exit(self, code=None, timeout=1):
def exit(self, code=None, timeout=5):
self.wait(timeout)

if code is None:
Expand All @@ -536,7 +536,7 @@ def exit(self, code=None, timeout=1):
raise Error("expected exit code {}, not {}".format(code, self.exitstatus))
return self

def wait(self, timeout=1):
def wait(self, timeout=5):
end = time.time() + timeout
while time.time() <= end:
if not self.child.isalive():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ class CustomInstall(install):
"console_scripts": ["check50=check50:main"]
},
url="https://github.com/cs50/check50",
version="2.1.0"
version="2.1.1"
)

0 comments on commit 694d1b9

Please sign in to comment.