Skip to content

TST: unreliable parser test #21763

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

Closed
jreback opened this issue Jul 6, 2018 · 4 comments
Closed

TST: unreliable parser test #21763

jreback opened this issue Jul 6, 2018 · 4 comments
Labels
IO CSV read_csv, to_csv Testing pandas testing functions or related to the test suite Unreliable Test Unit tests that occasionally fail
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jul 6, 2018

this test is somehow non-deterministic and occasionally fails with a ResourceWarning: https://circleci.com/gh/pandas-dev/pandas/15501#tests/containers/3

not really sure if this is a red-herring of something else

self = <pandas.tests.io.parser.test_parsers.TestPythonParser object at 0x7f90482356a0>

    def test_empty_with_dup_column_pass_dtype_by_indexes(self):
        # see gh-9424
        expected = pd.concat([Series([], name='one', dtype='u1'),
                              Series([], name='one.1', dtype='f')], axis=1)
    
        data = 'one,one'
        result = self.read_csv(StringIO(data), dtype={0: 'u1', 1: 'f'})
        tm.assert_frame_equal(result, expected, check_index_type=False)
    
        with tm.assert_produces_warning(UserWarning, check_stacklevel=False):
            data = ''
            result = self.read_csv(StringIO(data), names=['one', 'one'],
                                   dtype={0: 'u1', 1: 'f'})
>           tm.assert_frame_equal(result, expected, check_index_type=False)
@jreback jreback added Testing pandas testing functions or related to the test suite IO CSV read_csv, to_csv Unreliable Test Unit tests that occasionally fail labels Jul 6, 2018
@jreback jreback added this to the Next Major Release milestone Jul 6, 2018
@jreback
Copy link
Contributor Author

jreback commented Jul 6, 2018

cc @gfyoung

@gfyoung
Copy link
Member

gfyoung commented Jul 6, 2018

@jreback : My first inclination is that it's a red herring of something else outside of test_parsers.py. When I run pytest on just test_parsers.py, I don't get that failure. However, when I run the entire test suite, I do get the failure (occasionally).

@jreback
Copy link
Contributor Author

jreback commented Jul 6, 2018

yeah not really sure what is actually triggering this.

@gfyoung gfyoung modified the milestones: Contributions Welcome, 0.24.0 Jul 7, 2018
@gfyoung
Copy link
Member

gfyoung commented Jul 7, 2018

Going to monitor this test for the time being and will see if it rears its head again later on down the road. If it doesn't, I feel okay with closing this since we should be able to figure out now where it's originating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv Testing pandas testing functions or related to the test suite Unreliable Test Unit tests that occasionally fail
Projects
None yet
Development

No branches or pull requests

2 participants