resolve
and makeBinary
are really the spots that take the majority of the time.
The make test
target is really running pytest
under the hood which you can invoke manually. i.e.
python3 -m pytest tests/numeric_test.py
You can run a specific one via
python3 -m pytest tests/numeric_test.py::NumericTest::testHistogram
Passing the -s
option will also write all of the output to stdout
pytest.ini
configuration file
make test-all
process and then re-run just one of the test files manually with the -s
option to see what's going on.
ps -ef|grep arkouda_server
yields a running server
export ARKOUDA_DEVELOPER=1
)
E AssertionError: 'type[32 chars] of (Categorical, str, str_); got int instead' != 'type[32 chars] of (arkouda.categorical.Categorical, str, num[21 chars]tead'
E - type of argument "other" must be one of (Categorical, str, str_); got int instead
E + type of argument "other" must be one of (arkouda.categorical.Categorical, str, numpy.str_); got int instead
========================================================================================== FAILURES ==========================================================================================
_________________________________________________________________________________ CategoricalTest.testBinop __________________________________________________________________________________
self = <categorical_test.CategoricalTest testMethod=testBinop>
def testBinop(self):
cat = self._getCategorical()
catDupe = self._getCategorical()
catNonDupe = self._getRandomizedCategorical()
self.assertTrue((cat._binop(catDupe,'==')).all())
self.assertTrue((cat._binop(catNonDupe,'!=')).all())
self.assertTrue((ak.array([True,True,True,True,True,True,True,
True,True,True]) == cat._binop(catDupe,'==')).all())
self.assertTrue((ak.array([False,False,False,False,False,False,
False,False,False,False]) == cat._binop(catDupe,'!=')).all())
self.assertTrue((ak.array([True,False,False,False,False,False,
False,False,False,False]) ==
cat._binop('string 1', '==')).all())
self.assertTrue((ak.array([True,False,False,False,False,False,
False,False,False,False]) ==
cat._binop(np.str_('string 1'), '==')).all())
self.assertTrue((ak.array([False,True,True,True,True,True,True,True,True,True]) ==
cat._binop('string 1', '!=')).all())
self.assertTrue((ak.array([False,True,True,True,True,True,True,True,True,True]) ==
cat._binop(np.str_('string 1'), '!=')).all())
with self.assertRaises(NotImplementedError):
cat._binop('string 1', '===')
with self.assertRaises(TypeError) as cm:
cat._binop(1, '==')
> self.assertEqual(('type of argument "other" must be one of (Categorical, str, str_);' +
' got int instead'),
cm.exception.args[0])
E AssertionError: 'type[32 chars] of (Categorical, str, str_); got int instead' != 'type[32 chars] of (arkouda.categorical.Categorical, str, num[21 chars]tead'
E - type of argument "other" must be one of (Categorical, str, str_); got int instead
E + type of argument "other" must be one of (arkouda.categorical.Categorical, str, numpy.str_); got int instead
E ? ++++++++++++++++++++ ++++++
tests/categorical_test.py:129: AssertionError
================================================================================== short test summary info ===================================================================================
Name: numpy
Version: 1.20.1
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: /home/users/p02405/anaconda3/lib/python3.8/site-packages
Requires:
Required-by: tifffile, tables, statsmodels, seaborn, scipy, scikit-learn, scikit-image, PyWavelets, pyerfa, patsy, pandas, numexpr, numba, mkl-random, mkl-fft, matplotlib, imageio, hdflow, h5py, Bottleneck, bokeh, bkcharts, astropy
conda
or python's venv
to manage the development environment. It makes it much easier to control and test versioning of various dependencies.
Name: numpy
Version: 1.19.3
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: /home/users/p02405/.local/lib/python3.8/site-packages
Requires:
Required-by: tifffile, tables, statsmodels, seaborn, scipy, scikit-learn, scikit-image, PyWavelets, pyerfa, patsy, pandas, numexpr, numba, mkl-random, mkl-fft, matplotlib, imageio, hdflow, h5py, Bottleneck, bokeh, bkcharts, astropy
__________________________ CategoricalTest.testBinop ___________________________
self = <categorical_test.CategoricalTest testMethod=testBinop>
def testBinop(self):
cat = self._getCategorical()
catDupe = self._getCategorical()
catNonDupe = self._getRandomizedCategorical()
self.assertTrue((cat._binop(catDupe,'==')).all())
self.assertTrue((cat._binop(catNonDupe,'!=')).all())
self.assertTrue((ak.array([True,True,True,True,True,True,True,
True,True,True]) == cat._binop(catDupe,'==')).all())
self.assertTrue((ak.array([False,False,False,False,False,False,
False,False,False,False]) == cat._binop(catDupe,'!=')).all())
self.assertTrue((ak.array([True,False,False,False,False,False,
False,False,False,False]) ==
cat._binop('string 1', '==')).all())
self.assertTrue((ak.array([True,False,False,False,False,False,
False,False,False,False]) ==
cat._binop(np.str_('string 1'), '==')).all())
self.assertTrue((ak.array([False,True,True,True,True,True,True,True,True,True]) ==
cat._binop('string 1', '!=')).all())
self.assertTrue((ak.array([False,True,True,True,True,True,True,True,True,True]) ==
cat._binop(np.str_('string 1'), '!=')).all())
with self.assertRaises(NotImplementedError):
cat._binop('string 1', '===')
with self.assertRaises(TypeError) as cm:
cat._binop(1, '==')
> self.assertEqual(('type of argument "other" must be one of (Categorical, str, str_);' +
' got int instead'),
cm.exception.args[0])
E AssertionError: 'type[32 chars] of (Categorical, str, str_); got int instead' != 'type[32 chars] of (arkouda.categorical.Categorical, str, num[21 chars]tead'
E - type of argument "other" must be one of (Categorical, str, str_); got int instead
E + type of argument "other" must be one of (arkouda.categorical.Categorical, str, numpy.str_); got int instead
E ? ++++++++++++++++++++ ++++++
tests/categorical_test.py:129: AssertionError