|
|
01fc1b7 |
Index: setup.py
|
|
|
01fc1b7 |
===================================================================
|
|
|
01fc1b7 |
RCS file: /home/repository/biopython/biopython/setup.py,v
|
|
|
01fc1b7 |
retrieving revision 1.116
|
|
|
01fc1b7 |
diff -u -p -r1.116 setup.py
|
|
|
01fc1b7 |
--- setup.py 17 Mar 2007 19:21:04 -0000 1.116
|
|
|
01fc1b7 |
+++ setup.py 11 Apr 2007 03:37:48 -0000
|
|
|
01fc1b7 |
@@ -238,11 +238,18 @@ class test_biopython(Command):
|
|
|
01fc1b7 |
|
|
|
01fc1b7 |
"""
|
|
|
01fc1b7 |
description = "Automatically run the test suite for Biopython."
|
|
|
01fc1b7 |
- user_options = [] # distutils complains if this is not here.
|
|
|
01fc1b7 |
- def initialize_options(self): # distutils wants this
|
|
|
01fc1b7 |
- pass
|
|
|
01fc1b7 |
- def finalize_options(self): # this too
|
|
|
01fc1b7 |
+
|
|
|
01fc1b7 |
+ user_options = [
|
|
|
01fc1b7 |
+ # provide the option to run tests in no-gui mode
|
|
|
01fc1b7 |
+ ('no-gui', None, "Do not run in GUI mode")
|
|
|
01fc1b7 |
+ ]
|
|
|
01fc1b7 |
+
|
|
|
01fc1b7 |
+ def initialize_options(self):
|
|
|
01fc1b7 |
+ self.no_gui = None
|
|
|
01fc1b7 |
+
|
|
|
01fc1b7 |
+ def finalize_options(self):
|
|
|
01fc1b7 |
pass
|
|
|
01fc1b7 |
+
|
|
|
01fc1b7 |
def run(self):
|
|
|
01fc1b7 |
this_dir = os.getcwd()
|
|
|
01fc1b7 |
|
|
|
01fc1b7 |
@@ -250,7 +257,10 @@ class test_biopython(Command):
|
|
|
01fc1b7 |
os.chdir("Tests")
|
|
|
01fc1b7 |
sys.path.insert(0, '')
|
|
|
01fc1b7 |
import run_tests
|
|
|
01fc1b7 |
- run_tests.main([])
|
|
|
01fc1b7 |
+ if self.no_gui:
|
|
|
01fc1b7 |
+ run_tests.main(['--no-gui'])
|
|
|
01fc1b7 |
+ else:
|
|
|
01fc1b7 |
+ run_tests.main([])
|
|
|
01fc1b7 |
|
|
|
01fc1b7 |
# change back to the current directory
|
|
|
01fc1b7 |
os.chdir(this_dir)
|
|
|
01fc1b7 |
Index: Tests/run_tests.py
|
|
|
01fc1b7 |
===================================================================
|
|
|
01fc1b7 |
RCS file: /home/repository/biopython/biopython/Tests/run_tests.py,v
|
|
|
01fc1b7 |
retrieving revision 1.8
|
|
|
01fc1b7 |
diff -u -p -r1.8 run_tests.py
|
|
|
01fc1b7 |
--- Tests/run_tests.py 9 Mar 2007 23:36:43 -0000 1.8
|
|
|
01fc1b7 |
+++ Tests/run_tests.py 11 Apr 2007 03:37:48 -0000
|
|
|
01fc1b7 |
@@ -56,7 +56,7 @@ def main(argv):
|
|
|
01fc1b7 |
|
|
|
01fc1b7 |
# get the command line options
|
|
|
01fc1b7 |
try:
|
|
|
01fc1b7 |
- opts, args = getopt.getopt(argv[1:], 'g',
|
|
|
01fc1b7 |
+ opts, args = getopt.getopt(argv, 'g',
|
|
|
01fc1b7 |
["generate", "no-gui", "help"])
|
|
|
01fc1b7 |
except getopt.error, msg:
|
|
|
01fc1b7 |
print msg
|
|
|
01fc1b7 |
@@ -316,5 +316,5 @@ def convert_string_newlines(line):
|
|
|
01fc1b7 |
return line
|
|
|
01fc1b7 |
|
|
|
01fc1b7 |
if __name__ == "__main__":
|
|
|
01fc1b7 |
- sys.exit(main(sys.argv))
|
|
|
01fc1b7 |
+ sys.exit(main(sys.argv[1:]))
|
|
|
01fc1b7 |
|