Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: troubleshot numexpr test #26729

Conversation

simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins commented Jun 8, 2019

seemingly unrelated test failure to changes in PR #26662

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=12414

_______ TestAlignment.test_basic_series_frame_alignment[numexpr-python] ________
[gw0] linux -- Python 3.6.8 /home/vsts/miniconda3/envs/pandas-dev/bin/python

self = <pandas.tests.computation.test_eval.TestAlignment object at 0x7f5f831aa5c0>
engine = 'numexpr', parser = 'python'

    def test_basic_series_frame_alignment(self, engine, parser):
        def testit(r_idx_type, c_idx_type, index_name):
            df = mkdf(10, 7, data_gen_f=f, r_idx_type=r_idx_type,
                      c_idx_type=c_idx_type)
            index = getattr(df, index_name)
            s = Series(np.random.randn(5), index[:5])
            if should_warn(s.index, df.index):
                with tm.assert_produces_warning(RuntimeWarning):
                    res = pd.eval('s + df', engine=engine, parser=parser)
            else:
                res = pd.eval('s + df', engine=engine, parser=parser)
    
            if r_idx_type == 'dt' or c_idx_type == 'dt':
                expected = df.add(s) if engine == 'numexpr' else s + df
            else:
                expected = s + df
            assert_frame_equal(res, expected)
    
        # only test dt with dt, otherwise weird joins result
        args = product(['i', 'u', 's'], ['i', 'u', 's'], ('index', 'columns'))
        with warnings.catch_warnings(record=True):
            # avoid warning about comparing strings and ints
            warnings.simplefilter("ignore", RuntimeWarning)
    
            for r_idx_type, c_idx_type, index_name in args:
>               testit(r_idx_type, c_idx_type, index_name)

pandas/tests/computation/test_eval.py:934: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pandas/tests/computation/test_eval.py:925: in testit
    assert_frame_equal(res, expected)
pandas/_libs/testing.pyx:65: in pandas._libs.testing.assert_almost_equal
    cpdef assert_almost_equal(a, b,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   raise_assert_detail(obj, msg, lobj, robj)
E   AssertionError: DataFrame.columns are different
E   
E   DataFrame.columns values are different (100.0 %)
E   [left]:  Index([           0,            1,            2,            3,            4,
E          '0בקבנ899זק', '28ףן4כנךטש', '63צגהק5שץן', '7סף4נלדקסב', 'אגןנםצככד0',
E          'וכ2ףזאמאןא', 'ל8לצאןחצךר'],
E         dtype='object')
E   [right]: Index(['0בקבנ899זק', '28ףן4כנךטש', '63צגהק5שץן', '7סף4נלדקסב', 'אגןנםצככד0',
E          'וכ2ףזאמאןא', 'ל8לצאןחצךר',            0,            1,            2,
E                     3,            4],
E         dtype='object')

pandas/_libs/testing.pyx:178: AssertionError

@simonjayhawkins
Copy link
Member Author

not reproducing failure. will merge master to check.

@simonjayhawkins
Copy link
Member Author

closing as not reproducing failure.

@simonjayhawkins simonjayhawkins deleted the WillAyd-excel-fixture-cleanup branch August 24, 2019 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants