hoytak / treedict

TreeDict is a fast, flexible and full-featured hierarchical python container that makes simple and sophisticated bookkeeping easy.
http://www.stat.washington.edu/~hoytak/code/treedict/
Other
30 stars 9 forks source link

Pregenerated c source out of sync #4

Closed benureau closed 11 years ago

benureau commented 11 years ago

Hello,

Installing from pregenerated source will not pass all the unit tests, whereas they pass fine with a cython install. It seems to be out of sync with the cython code, notably an issue with freeze() and the values_only keyword. Specifically :

>> python tests.py
.................................E..................EEE.....................................E................................EEE.............EEE....................................EEEE...........................................................................................................................................................................................................................................................................................................................................EE..................................................EEEEEEE.............................................EEEEEE...
======================================================================
ERROR: testAttaching_12_propegatingFrozenFlags (test_branches.TestAttachPop)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_branches.py", line 319, in testAttaching_12_propegatingFrozenFlags
    p1.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testBranchAllowedWhenValueFrozen_01 (test_branches.TestBranches)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_branches.py", line 589, in testBranchAllowedWhenValueFrozen_01
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testBranchHasValuePropegationFlags_01 (test_branches.TestBranches)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_branches.py", line 597, in testBranchHasValuePropegationFlags_01
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testBranchHasValuePropegationFlags_02 (test_branches.TestBranches)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_branches.py", line 606, in testBranchHasValuePropegationFlags_02
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDangling_15_DanglingWhileValueFrozen_01 (test_branches.TestDangling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_branches.py", line 919, in testDangling_15_DanglingWhileValueFrozen_01
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDeletionPI_12_Frozen_ValuesOnly (test_deletion.TestDeletion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_deletion.py", line 414, in testDeletionPI_12_Frozen_ValuesOnly
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDeletionPI_13_Frozen_ValuesOnly (test_deletion.TestDeletion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_deletion.py", line 428, in testDeletionPI_13_Frozen_ValuesOnly
    p.freeze('a', values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDeletionPI_14_Frozen_ValuesOnly (test_deletion.TestDeletion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_deletion.py", line 442, in testDeletionPI_14_Frozen_ValuesOnly
    p.freeze('a', values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDeletion_12_Frozen_ValuesOnly (test_deletion.TestDeletion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_deletion.py", line 300, in testDeletion_12_Frozen_ValuesOnly
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDeletion_13_Frozen_ValuesOnly (test_deletion.TestDeletion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_deletion.py", line 314, in testDeletion_13_Frozen_ValuesOnly
    p.freeze('a', values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDeletion_14_Frozen_ValuesOnly (test_deletion.TestDeletion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_deletion.py", line 328, in testDeletion_14_Frozen_ValuesOnly
    p.freeze('a', values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testHashError_01 (test_hashes.TestHashes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_hashes.py", line 287, in testHashError_01
    self.assertRaises(HashError, lambda: p.hash())
  File "/Users/fabien/.pythonbrew/pythons/Python-2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 471, in assertRaises
    callableObj(*args, **kwargs)
  File "/Users/fabien/Research/local/treedict/tests/test_hashes.py", line 287, in <lambda>
    self.assertRaises(HashError, lambda: p.hash())
  File "treedict.pyx", line 3016, in treedict.treedict.TreeDict.hash (treedict/treedict.c:24852)
  File "treedict.pyx", line 3095, in treedict.treedict.TreeDict.hash (treedict/treedict.c:24730)
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed

======================================================================
ERROR: testHashError_02 (test_hashes.TestHashes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_hashes.py", line 305, in testHashError_02
    self.assert_(he.key == 'a.b', he.key)
AttributeError: 'HashError' object has no attribute 'key'

======================================================================
ERROR: testHashError_03 (test_hashes.TestHashes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_hashes.py", line 318, in testHashError_03
    self.assert_(he.key == 'a.b', he.key)
AttributeError: 'HashError' object has no attribute 'key'

======================================================================
ERROR: testHashError_05_custom (test_hashes.TestHashes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_hashes.py", line 334, in testHashError_05_custom
    self.assert_(p.hash() != p.hash())
  File "treedict.pyx", line 3016, in treedict.treedict.TreeDict.hash (treedict/treedict.c:24852)
  File "treedict.pyx", line 3095, in treedict.treedict.TreeDict.hash (treedict/treedict.c:24730)
PicklingError: Can't pickle test_hashes.HType: attribute lookup test_hashes.HType failed

======================================================================
ERROR: testDrySet_10_makeBranch_Frozen_ValuesOnly_01 (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 480, in testDrySet_10_makeBranch_Frozen_ValuesOnly_01
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testDrySet_10_makeBranch_Frozen_ValuesOnly_01b (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 491, in testDrySet_10_makeBranch_Frozen_ValuesOnly_01b
    p.b.freeze(values_only = True) # only freeze branch, checkset from base
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testSet_30_ValueFrozen_01 (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 340, in testSet_30_ValueFrozen_01
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testSet_30_ValueFrozen_02 (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 347, in testSet_30_ValueFrozen_02
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testSet_30_ValueFrozen_03 (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 354, in testSet_30_ValueFrozen_03
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testSet_30_ValueFrozen_04 (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 361, in testSet_30_ValueFrozen_04
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testSet_30_ValueFrozen_05 (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 368, in testSet_30_ValueFrozen_05
    p.a.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testSet_30_ValueFrozen_06_proper_Exception (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 374, in testSet_30_ValueFrozen_06_proper_Exception
    self.assertRaises(ValueError, lambda: p.freeze(structure_only = True, values_only = True))
  File "/Users/fabien/.pythonbrew/pythons/Python-2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 471, in assertRaises
    callableObj(*args, **kwargs)
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 374, in <lambda>
    self.assertRaises(ValueError, lambda: p.freeze(structure_only = True, values_only = True))
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testSet_30_ValueFrozen_07 (test_setting.TestSetting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_setting.py", line 379, in testSet_30_ValueFrozen_07
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testUpdate_WithFreezing_ValuesOnly_01 (test_update.TestUpdate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_update.py", line 642, in testUpdate_WithFreezing_ValuesOnly_01
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testUpdate_WithFreezing_ValuesOnly_02 (test_update.TestUpdate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_update.py", line 657, in testUpdate_WithFreezing_ValuesOnly_02
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testUpdate_WithFreezing_ValuesOnly_03 (test_update.TestUpdate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_update.py", line 672, in testUpdate_WithFreezing_ValuesOnly_03
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testUpdate_WithFreezing_ValuesOnly_04 (test_update.TestUpdate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_update.py", line 684, in testUpdate_WithFreezing_ValuesOnly_04
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testUpdate_WithFreezing_ValuesOnly_05 (test_update.TestUpdate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_update.py", line 698, in testUpdate_WithFreezing_ValuesOnly_05
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

======================================================================
ERROR: testUpdate_WithFreezing_ValuesOnly_06 (test_update.TestUpdate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fabien/Research/local/treedict/tests/test_update.py", line 714, in testUpdate_WithFreezing_ValuesOnly_06
    p.freeze(values_only = True)
  File "treedict.pyx", line 1471, in treedict.treedict.TreeDict.freeze (treedict/treedict.c:12227)
TypeError: freeze() got an unexpected keyword argument 'values_only'

----------------------------------------------------------------------
Ran 628 tests in 3.354s

FAILED (errors=30) 
hoytak commented 11 years ago

Thanks! Fixed.