Skip to content

Instantly share code, notes, and snippets.

@ljwolf
Last active August 29, 2015 14:24
Show Gist options
  • Save ljwolf/8d28eb6a81a707b5cf6e to your computer and use it in GitHub Desktop.
Save ljwolf/8d28eb6a81a707b5cf6e to your computer and use it in GitHub Desktop.
Pysal 2to3 nose errors
................F...
======================================================================
FAIL: test_assuncao_rate (__main__.TestUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/esda/tests/test_smoothing.py", line 236, in test_assuncao_rate
exp_assuncao, sm.assuncao_rate(e, b)[:4])
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
precision=decimal)
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals
(mismatch 100.0%)
x: array([ 1.043193, -0.041179, -0.565391, -1.737625])
y: array([ 1.038436, -0.040991, -0.562504, -1.730619])
----------------------------------------------------------------------
Ran 20 tests in 0.328s
FAILED (failures=1)
FFFF
======================================================================
FAIL: test_Maxp (__main__.Test_Maxp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/region/tests/test_maxp.py", line 20, in test_Maxp
self.assertEqual(solution.p, 29)
AssertionError: 30 != 29
======================================================================
FAIL: test_Maxp_LISA (__main__.Test_Maxp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/region/tests/test_maxp.py", line 49, in test_Maxp_LISA
self.assertEqual(mpl.regions[0], [99, 89, 98])
AssertionError: Lists differ: [99, 89, 79] != [99, 89, 98]
First differing element 2:
79
98
- [99, 89, 79]
? -
+ [99, 89, 98]
? +
======================================================================
FAIL: test_cinference (__main__.Test_Maxp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/region/tests/test_maxp.py", line 41, in test_cinference
self.assertAlmostEqual(solution.cpvalue, 0.10000000000000001, 10)
AssertionError: 0.2 != 0.1 within 10 places
======================================================================
FAIL: test_inference (__main__.Test_Maxp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/region/tests/test_maxp.py", line 31, in test_inference
self.assertAlmostEqual(solution.pvalue, 0.20000000000000001, 10)
AssertionError: 0.3 != 0.2 within 10 places
----------------------------------------------------------------------
Ran 4 tests in 0.941s
FAILED (failures=4)
/home/ljw/dev/pysal/pysal/core/util/shapefile.py:623: DeprecationWarning: fromstring() is deprecated. Use frombytes() instead.
_unpackDict2(record, contentStruct, dat)
/usr/lib/python3.4/unittest/case.py:573: ResourceWarning: unclosed file <_io.BufferedReader name='/home/ljw/dev/pysal/pysal/examples/columbus.dbf'>
self.setUp()
..pysal/spreg/tests/test_error_sp_regimes.py:296: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
model1 = GM_Combo(self.y_a[0:(self.n2)].reshape((self.n2),1), self.x_a1[0:(self.n2)], yend=self.x_a2[0:(self.n2)], q=self.q_a[0:(self.n2)], w=self.w_a1)
pysal/spreg/tests/test_error_sp_regimes.py:297: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
model2 = GM_Combo(self.y_a[(self.n2):].reshape((self.n2),1), self.x_a1[(self.n2):], yend=self.x_a2[(self.n2):], q=self.q_a[(self.n2):], w=self.w_a1)
.FF
======================================================================
FAIL: test_model_endog (__main__.TestGM_Error_Regimes)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/spreg/tests/test_error_sp_regimes.py", line 158, in test_model_endog
np.testing.assert_array_almost_equal(reg.vm[0],vm,4)
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
precision=decimal)
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 4 decimals
(mismatch 16.66666666666667%)
x: array([ 390.8821, 52.2591, 0. , 0. , -32.6427, 0. ])
y: array([ 390.8825, 52.2592, 0. , 0. , -32.6427, 0. ])
======================================================================
FAIL: test_model_endog_regi_error (__main__.TestGM_Error_Regimes)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/spreg/tests/test_error_sp_regimes.py", line 199, in test_model_endog_regi_error
self.assertAlmostEqual(reg.chow.joint[0],chow_j)
AssertionError: 1.1184630202423538 != 1.1184631131987004 within 7 places
----------------------------------------------------------------------
Ran 5 tests in 0.156s
FAILED (failures=2)
/home/ljw/dev/pysal/pysal/core/util/shapefile.py:623: DeprecationWarning: fromstring() is deprecated. Use frombytes() instead.
_unpackDict2(record, contentStruct, dat)
/usr/lib/python3.4/unittest/case.py:573: ResourceWarning: unclosed file <_io.BufferedReader name='/home/ljw/dev/pysal/pysal/examples/columbus.dbf'>
self.setUp()
F..F..
======================================================================
FAIL: test_model (__main__.TestBaseGMCombo)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/spreg/tests/test_error_sp_sparse.py", line 262, in test_model
np.testing.assert_array_almost_equal(reg.vm,vm,4)
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
precision=decimal)
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 4 decimals
(mismatch 6.25%)
x: array([[ 522.4383, -6.0726, -1.9143, -8.9713],
[ -6.0726, 0.238 , 0.047 , 0.0281],
[ -1.9143, 0.047 , 0.0321, 0.0031],
[ -8.9713, 0.0281, 0.0031, 0.2158]])
y: array([[ 522.4384, -6.0726, -1.9143, -8.9713],
[ -6.0726, 0.238 , 0.047 , 0.0281],
[ -1.9143, 0.047 , 0.0321, 0.0031],
[ -8.9713, 0.0281, 0.0031, 0.2158]])
======================================================================
FAIL: test_model (__main__.TestGMCombo)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/spreg/tests/test_error_sp_sparse.py", line 315, in test_model
np.testing.assert_array_almost_equal(reg.vm,vm,4)
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
precision=decimal)
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 4 decimals
(mismatch 6.25%)
x: array([[ 522.4383, -6.0726, -1.9143, -8.9713],
[ -6.0726, 0.238 , 0.047 , 0.0281],
[ -1.9143, 0.047 , 0.0321, 0.0031],
[ -8.9713, 0.0281, 0.0031, 0.2158]])
y: array([[ 522.4384, -6.0726, -1.9143, -8.9713],
[ -6.0726, 0.238 , 0.047 , 0.0281],
[ -1.9143, 0.047 , 0.0321, 0.0031],
[ -8.9713, 0.0281, 0.0031, 0.2158]])
----------------------------------------------------------------------
Ran 6 tests in 0.237s
FAILED (failures=2)
/usr/lib/python3.4/unittest/case.py:573: ResourceWarning: unclosed file <_io.BufferedReader name='/home/ljw/dev/pysal/pysal/examples/south.dbf'>
self.setUp()
/usr/lib/python3.4/site-packages/scipy/optimize/_minimize.py:573: RuntimeWarning: Method 'bounded' does not support relative tolerance in x; defaulting to absolute tolerance.
"defaulting to absolute tolerance.", RuntimeWarning)
E
======================================================================
ERROR: test_model (__main__.TestMLError)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pysal/spreg/tests/test_ml_error.py", line 25, in test_model
name_w="south_q.gal")
File "/home/ljw/dev/pysal/pysal/spreg/ml_error.py", line 448, in __init__
w=w, method=method, epsilon=epsilon)
File "/home/ljw/dev/pysal/pysal/spreg/ml_error.py", line 254, in __init__
self.vm = np.vstack((vv, vv1))
AttributeError: can't set attribute
----------------------------------------------------------------------
Ran 1 test in 111.783s
FAILED (errors=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment