Closed mathieuboudreau closed 4 years ago
) pytest test_data_exchange.py::TestDataExchange::test_get_num_matrix
=============================================================== test session starts ===============================================================
platform darwin -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /Users/bpeng/vatlab/sos-julia
plugins: cov-2.8.1
collected 1 item
test_data_exchange.py . [100%]
=============================================================== 1 passed in 25.15s ================================================================
The test passes here because I added an option expect_error
for a warning message that appears when some package is loaded in my particular configuration. Let me check if there is an allow_error
option so that the test could pass with/without error message.
The error message on my end is
Cell produces error message: /Users/bpeng/anaconda3/envs/sos/lib/python3.8/site-packages/pyarrow/feather.py:83: FutureWarning: The SparseDataFrame class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version
E if isinstance(df, _pandas_api.pd.SparseDataFrame):.
There is no option for allow_error
, maybe I will have to add it.
OK, I added
notebook.call(
'''\
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import feather''',
kernel='SoS')
to suppress the warning. Hopefully the unittests would all pass now.
Great, thanks @BoPeng ! As I mentionned, I think a few more of the tests might be failing (now the dataframe test fails, you can see by clicking the badge in the README). I haven't tested further, but I knew that this one was going to fail too by doing a quick test earlier on my end.
This is now #19 but neither sos notebook or sos julia calls pandas.lib. I will have to upgrade pandas to see who is to blame.
Not sure if you were aware, but your CI tests on Travis were failing due to an incompatibility between the Chrome version and the chromedriver version.
I dug in a bit, and found that the Travis Chrome addon wasn't installing the latest Chrome version with your settings, and the actual version in your tests dated back from 2017 (Version 63 I think).
The reason for this is because the
trusty
distribution doesn't have the updated dpkg tool I think, if I recall from my web search. I couldn't find a way to update that before Travis installs Chrome, but simply removing that dist resolved the issue ( except that now in the latest dist, libmagickcore5-extra isn't available, but it didn't appear to be necessary here so I removed it).I also updated the chromedriver for the latest version. If this solution isn't good enough for you and you'd prefer to keep the
trusty
dist, then you would need to remove the Travis call to install Chrome and downgrade the chromdriver to version 2.34 I think.Here's the Travis log showing that my fork now passes further than your Travis log: https://travis-ci.org/github/mathieuboudreau/sos-julia/builds/689072456
This also brings to light that not all of your unit tests are passing - at least one fails (and I suspect more than one will, with a quick check I made).
Hope this helps!