Cleanup: move copy-paste code into function
This commit is contained in:
@@ -49,10 +49,6 @@ class UnitTesting(RenderLayerTesting):
|
||||
# ############################################################
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
extra_arguments = sys.argv[sys.argv.index("--") + 2:] if "--" in sys.argv else []
|
||||
sys.argv = [__file__] + (sys.argv[sys.argv.index("--") + 2:] if "--" in sys.argv else [])
|
||||
|
||||
UnitTesting._extra_arguments = extra_arguments
|
||||
# XXX, above statement is not true, why skip the first argument?
|
||||
UnitTesting._extra_arguments = setup_extra_arguments(__file__)[1:]
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user