Changeset 642:e165d938d983

Show
Ignore:
Timestamp:
10/03/07 10:17:41 (1 year ago)
Author:
Greg Von Kuster <greg@bx.psu.edu>
branch:
default
convert_revision:
svn:9bcadc22-80f8-0310-8a53-c8f022958886/galaxy/trunk@1981
Message:

Cleaned up functional tests, eliminating some redundant tests and unused test data files. Next step, add many missing tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • run_functional_tests.sh

    r423 r642  
    11#!/bin/sh 
    22 
     3# A good place to look for nose info: http://somethingaboutorange.com/mrl/projects/nose/ 
     4 
    35rm -f run_functional_tests.log  
    4         echo "'run_functional_tests.sh help'                  for help" 
     6echo "'run_functional_tests.sh help'                  for help" 
    57 
    68if [ ! $1 ]; then 
     
    1416        ./nosetests.sh -v -w test functional.test_toolbox:GeneratedToolTestCase_$2 --with-nosehtml --html-report-file run_functional_tests.html 
    1517elif [ $1 = '-list' ]; then 
    16         python tool_list.py 
     18    python tool_list.py 
    1719        echo "===========================================================================================================================================" 
    18         echo "'run_functional_tests.sh help'                  for help" 
     20    echo "'run_functional_tests.sh help'                  for help" 
    1921        echo "'run_functional_tests.sh -id bbb'               for testing one tool with id 'bbb'" 
    2022else 
  • test/functional/__init__.py

    r489 r642  
    1010import twill, unittest, time 
    1111import os, os.path, subprocess, sys, threading 
     12import httplib 
    1213from galaxy.web.framework.servers import threadpool_server 
    1314import galaxy.app 
    1415from galaxy.app import UniverseApplication 
    1516from galaxy.web import buildapp 
     17import test_toolbox 
     18from galaxy import tools 
    1619 
    1720log = logging.getLogger( __name__ ) 
     
    2225default_galaxy_test_host = "localhost" 
    2326default_galaxy_test_port = "9999" 
    24  
    2527galaxy_test_file_dir = "test-data" 
    26  
    2728server = None 
    2829app = None 
     
    3839     
    3940    if start_server: 
    40  
    4141        if 'GALAXY_TEST_DBPATH' in os.environ: 
    4242            db_path = os.environ['GALAXY_TEST_DBPATH'] 
     
    6767        log.info( "Embedded Universe application started" ) 
    6868 
    69         webapp = buildapp.app_factory( dict(), 
    70                                        use_translogger = False, 
    71                                        app=app ) 
     69        webapp = buildapp.app_factory( dict(), use_translogger = False, app=app ) 
     70        server = threadpool_server.serve( webapp, dict(), host=galaxy_test_host, port=galaxy_test_port, start_loop=False ) 
    7271 
    73         server = threadpool_server.serve( webapp, dict(),  
    74                                           host=galaxy_test_host,  
    75                                           port=galaxy_test_port,  
    76                                           start_loop=False ) 
    77                  
    7872        atexit.register( teardown ) 
    79          
    80         import threading 
    8173        t = threading.Thread( target=server.serve_forever ) 
    8274        t.start() 
    83  
    8475        time.sleep( 2 ) 
    85          
    8676        log.info( "Embedded web server started" ) 
    8777     
    8878    if app: 
    8979        # TODO: provisions for loading toolbox from file when using external server 
    90         import test_toolbox 
    9180        test_toolbox.toolbox = app.toolbox 
    9281    else: 
    93         from galaxy import tools 
    94         import test_toolbox 
    9582        test_toolbox.toolbox = tools.ToolBox( 'tool_conf.xml', 'tools' ) 
    9683         
    9784    # Test if the server is up 
    98     import httplib 
    9985    conn = httplib.HTTPConnection( galaxy_test_host, galaxy_test_port ) 
    10086    conn.request( "GET", "/" ) 
  • test/functional/test_toolbox.py

    r587 r642  
    6868    Dynamically generate a `ToolTestCase` for `testdef` 
    6969    """ 
    70     n = "GeneratedToolTestCase_" + testdef.tool.id.replace( ' ', '_' ) 
     70    n = "TestForTool_" + testdef.tool.id.replace( ' ', '_' ) 
    7171    s = ( ToolTestCase, ) 
    7272    def test_tool( self ): 
  • tools/data_source/upload.xml

    r625 r642  
    22 
    33<tool name="Upload File" id="upload1"> 
    4        <description> 
    5                from your computer   
    6        </description> 
    7     <action module="galaxy.tools.actions.upload" class="UploadToolAction"/> 
    8        <inputs> 
    9                <param name="file_data" type="file" size="30" label="File"/>  
    10         <param name="url_paste" type="text" area="true" size="5x35" label="URL/Text" help="Here you may specify a list of URLs (one per line) or paste the contents of a file."/>  
    11         <param name="space_to_tab" type="select" display="checkboxes" multiple="True" label="Convert spaces to tabs" help="Use this option if you are entering intervals by hand.">  
    12                <option value="Yes">Yes</option> 
    13         </param> 
    14                <param type="select" name="file_type" label="File Format" dynamic_options="get_formats()" help="Which format? See help below" /> 
    15                <param label="Genome" name="dbkey" type="genomebuild" dynamic_options=""/> 
    16        </inputs> 
     4  <description> 
     5    from your computer   
     6  </description> 
     7  <action module="galaxy.tools.actions.upload" class="UploadToolAction"/> 
     8  <inputs> 
     9    <param name="file_data" type="file" size="30" label="File"/>  
     10    <param name="url_paste" type="text" area="true" size="5x35" label="URL/Text" help="Here you may specify a list of URLs (one per line) or paste the contents of a file."/>  
     11    <param name="space_to_tab" type="select" display="checkboxes" multiple="True" label="Convert spaces to tabs" help="Use this option if you are entering intervals by hand.">  
     12      <option value="Yes">Yes</option> 
     13    </param> 
     14    <param type="select" name="file_type" label="File Format" dynamic_options="get_formats()" help="Which format? See help below" /> 
     15    <param label="Genome" name="dbkey" type="genomebuild" dynamic_options=""/> 
     16  </inputs> 
    1717  <help> 
    1818**Auto-detect** 
     
    4747    chr22 2000 6000 cloneB 900 - 2000 6000 0 2 433,399, 0,3601 
    4848 
    49 Original description of the BED format can be found here_. 
    50  
    51 .. _here: http://genome.ucsc.edu/goldenPath/help/customTrack.html#BED 
    52  
    5349----- 
    5450 
     
    6460- END - The ending position of the feature in the chromosome or contig. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99. 
    6561- STRAND - Defines the strand - either '+' or '-'. 
     62 
    6663- Example:: 
    6764 
     
    9996**Gff3** 
    10097 
    101 The proposed GFF3 format addresses the most common extensions to GFF, while preserving backward compatibility with previous formats. 
     98The GFF3 format addresses the most common extensions to GFF, while preserving backward compatibility with previous formats. 
    10299 
    103100----- 
  • tools/filters/grep.xml

    r622 r642  
    1414  </outputs> 
    1515  <tests> 
    16           <test> 
    17             <param name="input" value="1.bed"/> 
    18             <param name="invert" value="false"/> 
    19             <param name="pattern" value="^chr[0-9]*"/> 
    20             <output name="out_file1" file="fs-grep.dat"/> 
    21           </test>   
     16    <test> 
     17      <param name="input" value="1.bed"/> 
     18      <param name="invert" value="false"/> 
     19      <param name="pattern" value="^chr[0-9]*"/> 
     20      <output name="out_file1" file="fs-grep.dat"/> 
     21    </test> 
     22    <test> 
     23      <param name="input" value="7.bed"/> 
     24      <param name="invert" value="false"/> 
     25      <param name="pattern" value="AY143171"/> 
     26      <output name="out_file1" file="sc_3E_select.bed"/> 
     27    </test>   
    2228  </tests> 
    2329  <help> 
  • tools/filters/joiner.xml

    r303 r642  
    2323      <param name="field2" value="2"/> 
    2424      <output name="out_file1" file="fs-joiner.dat"/> 
     25    </test> 
     26    <test> 
     27      <param name="input1" value="7.bed"/> 
     28      <param name="input2" value="8.bed"/> 
     29      <param name="field1" value="4"/> 
     30      <param name="field2" value="1"/> 
     31      <output name="out_file1" file="sc_3E_join.bed"/> 
    2532    </test> 
    2633  </tests> 
  • tools/filters/sorter.xml

    r602 r642  
    2525      <output name="out_file1" file="fs-sort.dat"/> 
    2626    </test> 
     27    <test> 
     28      <param name="input" value="7.bed"/> 
     29      <param name="column" value="1"/> 
     30      <param name="order" value="ASC"/> 
     31      <param name="style" value="alpha"/> 
     32      <output name="out_file1" file="sc_3E_sort.bed"/> 
     33    </test> 
    2734  </tests> 
    2835  <help> 
  • tools/stats/aggregate_scores_in_intervals.xml

    r259 r642  
    11<tool id="aggregate_scores_in_intervals1" description="from the table browser (equivalent to wiggle format)." name="Aggregate datapoints"> 
    2     <description>Appends the average, min, max, sum, and count of datapoints per interval</description> 
    3     <command interpreter="python2.4">aggregate_scores_in_intervals.py $input2 $input1 $input1_chromCol $input1_startCol $input1_endCol $out_file1</command> 
    4     <inputs> 
    5         <page> 
    6             <param format="wig" name="input2" type="data" label="Datapoints from table browser"/> 
    7             <param format="interval" name="input1" type="data" label="Interval file"/> 
    8         </page> 
    9     </inputs> 
    10     <outputs> 
    11         <data format="interval" name="out_file1" metadata_source="input2"/> 
    12     </outputs> 
    13     <tests> 
    14       <test> 
    15         <param name="input1" value="aggregate_binned_scores_in_intervals.bed" /> 
    16         <param name="datasets" value="aggregate_binned_scores_in_intervals.wig" /> 
    17         <output name="out_file1" file="aggregate_binned_scores_in_intervals.out" /> 
    18       </test> 
    19     </tests> 
    20     <help> 
     2  <description>Appends the average, min, max, sum, and count of datapoints per interval</description> 
     3  <command interpreter="python2.4">aggregate_scores_in_intervals.py $input2 $input1 $input1_chromCol $input1_startCol $input1_endCol $out_file1</command> 
     4  <inputs> 
     5    <page> 
     6      <param format="wig" name="input2" type="data" label="Datapoints from table browser"/> 
     7      <param format="interval" name="input1" type="data" label="Interval file"/> 
     8    </page> 
     9  </inputs> 
     10  <outputs> 
     11    <data format="interval" name="out_file1" metadata_source="input2"/> 
     12  </outputs> 
     13  <!-- TODO: This tool is currently not being used, uncomment and correct the tests if it ever is... 
     14  <tests> 
     15    <test> 
     16      <param name="input1" value="aggregate_binned_scores_in_intervals.bed" /> 
     17      <param name="datasets" value="aggregate_binned_scores_in_intervals.wig" /> 
     18      <output name="out_file1" file="aggregate_binned_scores_in_intervals.out" /> 
     19    </test> 
     20  </tests> --> 
     21  <help> 
    2122 
    2223.. class:: warningmark 
  • tools/stats/filtering.xml

    r422 r642  
    1616      <param name="cond" value="c1=='chr22'"/> 
    1717      <output name="out_file1" file="fs-filter.dat"/> 
     18    </test> 
     19    <test> 
     20      <param name="input" value="7.bed"/> 
     21      <param name="cond" value="c1=='chr1' and c3-c2>=2000 and c6=='+'"/> 
     22      <output name="out_file1" file="sc_3E_filter.bed"/> 
    1823    </test> 
    1924  </tests> 
  • tools/stats/grouping.py

    r606 r642  
    5555                float( elems[col] ) 
    5656            except: 
    57                 stop_err( "Operation '%s' cannot be performed on non-numeric column %d containing value %s." %( ops[k], col+1, elems[col] )) 
     57                stop_err( "Operation '%s' cannot be performed on non-numeric column %d containing value '%s'." %( ops[k], col+1, elems[col] )) 
    5858     
    5959    tmpfile = tempfile.NamedTemporaryFile()