File tree 2 files changed +19
-1
lines changed
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):
9
9
parser .addoption ("--skip-slow" , action = "store_true" ,
10
10
help = "skip slow tests" )
11
11
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" )
13
15
parser .addoption ("--only-slow" , action = "store_true" ,
14
16
help = "run only slow tests" )
15
17
@@ -24,6 +26,9 @@ def pytest_runtest_setup(item):
24
26
if 'network' in item .keywords and item .config .getoption ("--skip-network" ):
25
27
pytest .skip ("skipping due to --skip-network" )
26
28
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
+
27
32
28
33
# Configurations for all tests and all test modules
29
34
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
3
3
import os
4
+ from io import StringIO
5
+
6
+ import pytest
4
7
5
8
import pandas .util .testing as tm
6
9
24
27
from .python_parser_only import PythonParserTests
25
28
from .dtypes import DtypeTests
26
29
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
+
27
40
28
41
class BaseParser (CommentTests , CompressionTests ,
29
42
ConverterTests , DialectTests ,
You can’t perform that action at this time.
0 commit comments