Skip to content

TST: unreliable parser test #21763

Closed
Closed
@jreback

Description

@jreback

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    IO CSVread_csv, to_csvTestingpandas testing functions or related to the test suiteUnreliable TestUnit tests that occasionally fail

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions