In [1]:
run test_matching.py
test_matching.TestDeferredAcceptance.test_female_proposal ... ERROR
test_matching.TestDeferredAcceptance.test_male_proposal ...
[0, 1, 2]
[4, 4, 4]
[3, 3, 3, 3]
[0, 1, 2, 3]
[3, 3, 3, 3]
[4, 4, 4]
FAIL
======================================================================
ERROR: test_matching.TestDeferredAcceptance.test_female_proposal
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\sourcetreerepository\matching2\test_matching.py", line 38, in test_female_proposal
deferred_acceptance(self.f_prefs, self.m_prefs)
File "C:\sourcetreerepository\matching2\matching.py", line 21, in deferred_acceptance
y = arg1[x].pop()
IndexError: list index out of range
======================================================================
FAIL: test_matching.TestDeferredAcceptance.test_male_proposal
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\sourcetreerepository\matching2\test_matching.py", line 33, in test_male_proposal
assert_array_equal(m_matched_computed, self.m_matched)
File "c:\anaconda\lib\site-packages\numpy\testing\utils.py", line 739, in assert_array_equal
verbose=verbose, header='Arrays are not equal')
File "c:\anaconda\lib\site-packages\numpy\testing\utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not equal
(mismatch 50.0%)
x: array([0, 2, 1, 3])
y: array([0, 1, 2, 3])
----------------------------------------------------------------------
Ran 2 tests in 0.020s
FAILED (errors=1, failures=1)
An exception has occurred, use %tb to see the full traceback.
SystemExit: True
In [ ]:
In [ ]:
Content source: bocchan/DAalgorithm
Similar notebooks: