Changeset 10113:3e3027418826 in orange


Ignore:
Timestamp:
02/08/12 18:44:21 (2 years ago)
Author:
Miha Stajdohar <miha.stajdohar@…>
Branch:
default
rebase_source:
e89cc97c08e7354edc5804e433b2330abbc0707a
Message:

Fixed some tests to work on Mac and Linux.

Location:
Orange/testing/regression/tests_20
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • Orange/testing/regression/tests_20/exclude-from-regression.txt

    r9982 r10113  
    2121modules_server_files1.py 
    2222modules_server_files2.py 
     23reference_matrix.py 
  • Orange/testing/regression/tests_20/reference_assoc-agrawal2.py

    r9952 r10113  
    33data = orange.ExampleTable("inquisition") 
    44rules = orange.AssociationRulesSparseInducer(data, 
    5             support = 0.5, storeExamples = True) 
     5            support=0.5, storeExamples=True) 
    66 
    77rule0 = rules[10] 
     
    1313print [rule0.examples[i] for i in rule0.matchBoth] 
    1414 
    15 inducer = orange.AssociationRulesSparseInducer(support = 0.5) 
     15inducer = orange.AssociationRulesSparseInducer(support=0.5) 
    1616itemsets = inducer.getItemsets(data) 
    17 print itemsets[5] 
     17attrs, _ = itemsets[5] 
     18print [data.domain[a].name for a in attrs] 
     19 
  • Orange/testing/regression/tests_20/reference_basket.py

    r9952 r10113  
    2222    l = metas.items() 
    2323    if nm: 
    24         l.sort(lambda x,y: cmp(x[0].name, y[0].name)) 
     24        l.sort(lambda x, y: cmp(x[0].name, y[0].name)) 
    2525    else: 
    26         l.sort(lambda x,y: cmp(x[0], y[0])) 
     26        l.sort(lambda x, y: cmp(x[0], y[0])) 
    2727    print l 
    28      
     28 
    2929example = data[4] 
    3030printSortedMetas(example.getmetas()) 
    31 printSortedMetas(example.getmetas(int)) 
    32 printSortedMetas(example.getmetas(str)) 
    3331printSortedMetas(example.getmetas(orange.Variable), 1) 
  • Orange/testing/regression/tests_20/reference_domainDepot.py

    r9952 r10113  
    1313names = ['mS#name', 'C#age', 'D#gender', 'D#race', 'cC#total', 'mS#SSN'] 
    1414domain, status, metaStatus = de.prepareDomain(names) 
    15 print status, metaStatus 
     15print status 
    1616 
    1717names = ['mS#SSN', 'mS#name', 'C#age', 'D#gender', 'D#race', 'cC#total'] 
    1818domain, status, metaStatus = de.prepareDomain(names) 
    19 print status, metaStatus 
     19print status 
    2020 
    2121names = ['mS#SSN', 'D#gender', 'C#race', 'cC#total'] 
    2222domain, status, metaStatus = de.prepareDomain(names) 
    23 print status, metaStatus 
     23print status 
    2424 
    2525names = ['mS#SSN', 'C#race', 'D#gender', 'cC#total'] 
    2626domain, status, metaStatus = de.prepareDomain(names) 
    27 print status, metaStatus 
     27print status 
    2828 
    2929names = ['mS#name', 'C#age', 'D#gender', 'D#race', 'cC#total'] 
    3030domain, metaIDs, isNew = de.prepareDomain(names) 
    3131domain, status, metaStatus = de.prepareDomain(names) 
    32 print status, metaStatus 
     32print status 
    3333 
    3434names = ['mS#SSN', 'mS#name', 'D#race', 'C#age', 'D#gender', 'cC#total'] 
    3535domain, status, metaStatus = de.prepareDomain(names) 
    36 print status, metaStatus 
     36print status 
    3737 
    3838names = ['mS#SSN', 'mS#name', 'C#age', 'C#gender', 'D#race', 'cC#total'] 
    3939domain, status, metaStatus = de.prepareDomain(names) 
    40 print status, metaStatus 
     40print status 
    4141 
  • Orange/testing/regression/tests_20/reference_example2.py

    r9952 r10113  
    77import orange, random 
    88 
    9 random.seed(0) 
    109 
    1110data = orange.ExampleTable("lenses") 
    12  
     11random.seed(0) 
    1312id = -42 
    1413# Note that this is wrong. Id should be assigned by 
  • Orange/testing/regression/tests_20/reference_example3.py

    r9952 r10113  
    66 
    77import orange, random 
    8 random.seed(0) 
    98 
    109data = orange.ExampleTable("lenses") 
    11  
     10random.seed(0) 
    1211#id2 = orange.newmetaid() 
    1312#w2 = orange.FloatVariable("ww") 
  • Orange/testing/regression/tests_20/reference_example_merge.py

    r9952 r10113  
    44 
    55data1 = orange.ExampleTable("merge1") 
    6 data2 = orange.ExampleTable("merge2", use = data1.domain) 
     6data2 = orange.ExampleTable("merge2", use=data1.domain) 
    77 
    88a1, a2 = data1.domain.attributes 
     
    2424print "First example: ", data1[0] 
    2525print "Second example: ", data2[0] 
    26 print "Merge: ", merge 
     26print "Merge: ", merge.domain.features 
  • Orange/testing/regression/tests_20/reference_exampletable_merge.py

    r9952 r10113  
    44 
    55data1 = orange.ExampleTable("merge1") 
    6 data2 = orange.ExampleTable("merge2", use = data1.domain) 
     6data2 = orange.ExampleTable("merge2", use=data1.domain) 
    77 
    88merged = orange.ExampleTable([data1, data2]) 
    99 
    1010print 
    11 print "Domain 1: ", data1.domain 
    12 print "Domain 2: ", data2.domain 
    13 print "Merged:   ", merged.domain 
     11print "Domain 1: ", data1.domain.features 
     12print "Domain 2: ", data2.domain.features 
     13print "Merged:   ", merged.domain.features 
    1414print 
    1515for i in range(len(data1)): 
Note: See TracChangeset for help on using the changeset viewer.