File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ def pytest_addoption(parser):
99 parser .addoption ("--skip-slow" , action = "store_true" ,
1010 help = "skip slow tests" )
1111 parser .addoption ("--skip-network" , action = "store_true" ,
12- help = "run network tests" )
12+ help = "skip network tests" )
13+ parser .addoption ("--run-highmemory" , action = "store_true" ,
14+ help = "run high memory tests" )
1315 parser .addoption ("--only-slow" , action = "store_true" ,
1416 help = "run only slow tests" )
1517
@@ -24,6 +26,9 @@ def pytest_runtest_setup(item):
2426 if 'network' in item .keywords and item .config .getoption ("--skip-network" ):
2527 pytest .skip ("skipping due to --skip-network" )
2628
29+ if 'high_memory' in item .keywords and not item .config .getoption ("--run-highmemory" ):
30+ pytest .skip ("skipping high memory test since --run-highmemory was not set" )
31+
2732
2833# Configurations for all tests and all test modules
2934
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
33import os
4+ from io import StringIO
5+
6+ import pytest
47
58import pandas .util .testing as tm
69
2427from .python_parser_only import PythonParserTests
2528from .dtypes import DtypeTests
2629
30+ @pytest .mark .high_memory
31+ def test_bytes_exceed_2gb ():
32+ """Read from a "CSV" that has a column larger than 2GB.
33+
34+ GH 16798
35+ """
36+ csv = StringIO ('strings\n ' + '\n ' .join (['x' * (1 << 20 ) for _ in range (2100 )]))
37+ df = read_csv (csv , low_memory = False )
38+ assert not df .empty
39+
2740
2841class BaseParser (CommentTests , CompressionTests ,
2942 ConverterTests , DialectTests ,
You can’t perform that action at this time.
0 commit comments