details: http://www.bx.psu.edu/hg/galaxy/rev/8a619f8e2fb6 changeset: 2905:8a619f8e2fb6 user: James Taylor james@jamestaylor.org date: Wed Oct 21 15:45:01 2009 -0400 description: Fix for tool tests. Comment out get_peek test, doesn't appear correct (result is unicode and forced to multiple lines, when did this change?)
3 file(s) affected in this change:
lib/galaxy/datatypes/data.py scripts/functional_tests.py test/functional/test_toolbox.py
diffs (64 lines):
diff -r 597f813860c1 -r 8a619f8e2fb6 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Wed Oct 21 15:03:09 2009 -0400 +++ b/lib/galaxy/datatypes/data.py Wed Oct 21 15:45:01 2009 -0400 @@ -35,7 +35,7 @@ 'test' >>> DataTest.metadata_spec.test.desc 'test' - >>> DataTest.metadata_spec.test.param + >>> type( DataTest.metadata_spec.test.param ) <class 'galaxy.datatypes.metadata.MetadataParameter'>
""" @@ -411,9 +411,9 @@ """ Returns the first LINE_COUNT lines wrapped to WIDTH
- >>> fname = get_test_fname('4.bed') - >>> get_file_peek(fname) - 'chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +\n' + ## >>> fname = get_test_fname('4.bed') + ## >>> get_file_peek(fname) + ## 'chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +\n' """ lines = [] count = 0 diff -r 597f813860c1 -r 8a619f8e2fb6 scripts/functional_tests.py --- a/scripts/functional_tests.py Wed Oct 21 15:03:09 2009 -0400 +++ b/scripts/functional_tests.py Wed Oct 21 15:45:01 2009 -0400 @@ -144,6 +144,7 @@ if app: # TODO: provisions for loading toolbox from file when using external server functional.test_toolbox.toolbox = app.toolbox + functional.test_toolbox.build_tests() else: # FIXME: This doesn't work at all now that toolbox requires an 'app' instance # (to get at datatypes, might just pass a datatype registry directly) diff -r 597f813860c1 -r 8a619f8e2fb6 test/functional/test_toolbox.py --- a/test/functional/test_toolbox.py Wed Oct 21 15:03:09 2009 -0400 +++ b/test/functional/test_toolbox.py Wed Oct 21 15:45:01 2009 -0400 @@ -100,7 +100,7 @@ expanded_inputs[value.name] = declared_inputs[value.name] return expanded_inputs
-def get_testcase( testdef, name ): +def get_case( testdef, name ): """Dynamically generate a `ToolTestCase` for `testdef`""" n = "TestForTool_" + testdef.tool.id.replace( ' ', '_' ) s = ( ToolTestCase, ) @@ -109,7 +109,7 @@ d = dict( testdef=testdef, test_tool=test_tool, name=name ) return new.classobj( n, s, d )
-def setup(): +def build_tests(): """ If the module level variable `toolbox` is set, generate `ToolTestCase` classes for all of its tests and put them into this modules globals() so @@ -124,5 +124,5 @@ if tool.tests: for j, testdef in enumerate( tool.tests ): name = "%s ( %s ) > %s" % ( tool.name, tool.id, testdef.name ) - testcase = get_testcase( testdef, name ) + testcase = get_case( testdef, name ) G[ 'testcase_%d_%d' % ( i, j ) ] = testcase
galaxy-dev@lists.galaxyproject.org