-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
functional_test command cleanup, refactoring
- Loading branch information
Showing
8 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import sys | ||
|
||
def exception_string(): | ||
import traceback | ||
return '\n'.join(traceback.format_exception(*sys.exc_info())) | ||
|
||
def print_exception(): | ||
print "######################## Exception #############################" | ||
print exception_string() | ||
print "################################################################" | ||
|
||
def silence_print(): | ||
old_printerators=[sys.stdout,sys.stderr,sys.stdin,sys.__stdout__,sys.__stderr__,sys.__stdin__][:] | ||
sys.stdout,sys.stderr,sys.stdin,sys.__stdout__,sys.__stderr__,sys.__stdin__=dummyStream(),dummyStream(),dummyStream(),dummyStream(),dummyStream(),dummyStream() | ||
return old_printerators | ||
|
||
def unsilence_print(printerators): | ||
sys.stdout,sys.stderr,sys.stdin,sys.__stdout__,sys.__stderr__,sys.__stdin__=printerators | ||
|
||
|
||
class dummyStream: | ||
''' dummyStream behaves like a stream but does nothing. ''' | ||
# via http://www.answermysearches.com/python-temporarily-disable-printing-to-console/232/ | ||
def __init__(self): pass | ||
def write(self,data): pass | ||
def read(self,data): pass | ||
def flush(self): pass | ||
def close(self): pass | ||
|
||
def noprint(func): | ||
def wrapper(*args, **kw): | ||
_p = silence_print() | ||
output = func(*args, **kw) | ||
unsilence_print(_p) | ||
return output | ||
return wrapper |
This file was deleted.
Oops, something went wrong.
Binary file renamed
BIN
+21.7 MB
...lib/selenium-server-standalone-2.0rc2.jar → ..._lib/selenium-server-standalone-2.7.0.jar
Binary file not shown.
1 change: 1 addition & 0 deletions
1
functional_tests/management/commands/selenium_lib/selenium-server.jar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
selenium-server-standalone-2.7.0.jar |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters