Python pandas.io.parsers._python_unsupported() Examples

The following are 5 code examples of pandas.io.parsers._python_unsupported(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pandas.io.parsers , or try the search function .
Example #1
Source File: test_unsupported.py    From recruit with Apache License 2.0 6 votes vote down vote up
def test_python_engine(self, python_engine):
        from pandas.io.parsers import _python_unsupported as py_unsupported

        data = """1,2,3,,
1,2,3,4,
1,2,3,4,5
1,2,,,
1,2,3,4,"""

        for default in py_unsupported:
            msg = ('The %r option is not supported '
                   'with the %r engine' % (default, python_engine))

            kwargs = {default: object()}
            with pytest.raises(ValueError, match=msg):
                read_csv(StringIO(data), engine=python_engine, **kwargs) 
Example #2
Source File: test_unsupported.py    From vnpy_crypto with MIT License 6 votes vote down vote up
def test_python_engine(self, python_engine):
        from pandas.io.parsers import _python_unsupported as py_unsupported

        data = """1,2,3,,
1,2,3,4,
1,2,3,4,5
1,2,,,
1,2,3,4,"""

        for default in py_unsupported:
            msg = ('The %r option is not supported '
                   'with the %r engine' % (default, python_engine))

            kwargs = {default: object()}
            with tm.assert_raises_regex(ValueError, msg):
                read_csv(StringIO(data), engine=python_engine, **kwargs) 
Example #3
Source File: test_unsupported.py    From predictive-maintenance-using-machine-learning with Apache License 2.0 6 votes vote down vote up
def test_python_engine(self, python_engine):
        from pandas.io.parsers import _python_unsupported as py_unsupported

        data = """1,2,3,,
1,2,3,4,
1,2,3,4,5
1,2,,,
1,2,3,4,"""

        for default in py_unsupported:
            msg = ('The %r option is not supported '
                   'with the %r engine' % (default, python_engine))

            kwargs = {default: object()}
            with pytest.raises(ValueError, match=msg):
                read_csv(StringIO(data), engine=python_engine, **kwargs) 
Example #4
Source File: test_unsupported.py    From elasticintel with GNU General Public License v3.0 6 votes vote down vote up
def test_python_engine(self, python_engine):
        from pandas.io.parsers import _python_unsupported as py_unsupported

        data = """1,2,3,,
1,2,3,4,
1,2,3,4,5
1,2,,,
1,2,3,4,"""

        for default in py_unsupported:
            msg = ('The %r option is not supported '
                   'with the %r engine' % (default, python_engine))

            kwargs = {default: object()}
            with tm.assert_raises_regex(ValueError, msg):
                read_csv(StringIO(data), engine=python_engine, **kwargs) 
Example #5
Source File: test_unsupported.py    From twitter-stock-recommendation with MIT License 6 votes vote down vote up
def test_python_engine(self, python_engine):
        from pandas.io.parsers import _python_unsupported as py_unsupported

        data = """1,2,3,,
1,2,3,4,
1,2,3,4,5
1,2,,,
1,2,3,4,"""

        for default in py_unsupported:
            msg = ('The %r option is not supported '
                   'with the %r engine' % (default, python_engine))

            kwargs = {default: object()}
            with tm.assert_raises_regex(ValueError, msg):
                read_csv(StringIO(data), engine=python_engine, **kwargs)