class documentation

class TestIO: (source)

View In Hierarchy

Test tofile, fromfile, tobytes, and fromstring

Method decimal_sep_localization Including this fixture in a test will automatically execute it with both types of decimal separator.
Method test_ascii Undocumented
Method test_big_binary Test workarounds for 32-bit limit for MSVC fwrite, fseek, and ftell
Method test_binary Undocumented
Method test_bool_fromstring Undocumented
Method test_counted_string Undocumented
Method test_counted_string_with_ws Undocumented
Method test_dtype Undocumented
Method test_dtype_bool Undocumented
Method test_empty_files_binary Undocumented
Method test_empty_files_text Undocumented
Method test_file_position_after_fromfile Undocumented
Method test_file_position_after_tofile Undocumented
Method test_fromfile_bad_dup Undocumented
Method test_fromfile_offset Undocumented
Method test_fromfile_subarray_binary Undocumented
Method test_fromstring_count0 Undocumented
Method test_inf Undocumented
Method test_int64_fromstring Undocumented
Method test_io_open_buffered_fromfile Undocumented
Method test_io_open_unbuffered_fromfile Undocumented
Method test_largish_file Undocumented
Method test_load_object_array_fromfile Undocumented
Method test_long_sep Undocumented
Method test_malformed Undocumented
Method test_nan Undocumented
Method test_nofile Undocumented
Method test_numbers Undocumented
Method test_parsing_subarray_unsupported Undocumented
Method test_read_shorter_than_count_subarray Undocumented
Method test_roundtrip Undocumented
Method test_roundtrip_binary_str Undocumented
Method test_roundtrip_dump_pathlib Undocumented
Method test_roundtrip_file Undocumented
Method test_roundtrip_repr Undocumented
Method test_roundtrip_str Undocumented
Method test_string Undocumented
Method test_string_with_ws Undocumented
Method test_tofile_cleanup Undocumented
Method test_tofile_format Undocumented
Method test_tofile_sep Undocumented
Method test_uint64_fromstring Undocumented
Method test_unseekable_fromfile Undocumented
Method tmp_filename Undocumented
Method x Undocumented
Method _check_from Undocumented
@pytest.fixture(params=['period', 'comma'])
def decimal_sep_localization(self, request): (source)

Including this fixture in a test will automatically execute it with both types of decimal separator.

So:

def test_decimal(decimal_sep_localization):
    pass

is equivalent to the following two tests:

def test_decimal_period_separator():
    pass

def test_decimal_comma_separator():
    with CommaDecimalPointLocale():
        pass
def test_ascii(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

@pytest.mark.slow
def test_big_binary(self): (source)

Test workarounds for 32-bit limit for MSVC fwrite, fseek, and ftell

These normally would hang doing something like this. See : https://github.com/numpy/numpy/issues/2256

def test_binary(self, tmp_filename): (source)

Undocumented

def test_bool_fromstring(self): (source)

Undocumented

def test_counted_string(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

def test_counted_string_with_ws(self, tmp_filename): (source)

Undocumented

def test_dtype(self, tmp_filename): (source)

Undocumented

def test_dtype_bool(self, tmp_filename): (source)

Undocumented

def test_empty_files_binary(self, tmp_filename): (source)

Undocumented

def test_empty_files_text(self, tmp_filename): (source)

Undocumented

def test_file_position_after_fromfile(self, tmp_filename): (source)

Undocumented

def test_file_position_after_tofile(self, tmp_filename): (source)

Undocumented

@pytest.mark.skipif(IS_PYPY, reason='bug in PyPy\'s PyNumber_AsSsize_t')
def test_fromfile_bad_dup(self, x, tmp_filename): (source)

Undocumented

def test_fromfile_offset(self, x, tmp_filename): (source)

Undocumented

def test_fromfile_subarray_binary(self, tmp_filename): (source)

Undocumented

def test_fromstring_count0(self): (source)

Undocumented

def test_inf(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

def test_int64_fromstring(self): (source)

Undocumented

def test_io_open_buffered_fromfile(self, x, tmp_filename): (source)

Undocumented

def test_io_open_unbuffered_fromfile(self, x, tmp_filename): (source)

Undocumented

def test_largish_file(self, tmp_filename): (source)

Undocumented

def test_load_object_array_fromfile(self, tmp_filename): (source)

Undocumented

def test_long_sep(self, tmp_filename): (source)

Undocumented

def test_malformed(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

def test_nan(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

def test_nofile(self): (source)

Undocumented

def test_numbers(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

def test_parsing_subarray_unsupported(self, tmp_filename): (source)

Undocumented

def test_read_shorter_than_count_subarray(self, tmp_filename): (source)

Undocumented

def test_roundtrip(self, x, tmp_filename): (source)

Undocumented

def test_roundtrip_binary_str(self, x): (source)

Undocumented

def test_roundtrip_dump_pathlib(self, x, tmp_filename): (source)

Undocumented

def test_roundtrip_file(self, x, tmp_filename): (source)

Undocumented

def test_roundtrip_repr(self, x): (source)

Undocumented

def test_roundtrip_str(self, x): (source)

Undocumented

def test_string(self, tmp_filename): (source)

Undocumented

def test_string_with_ws(self, tmp_filename): (source)

Undocumented

def test_tofile_cleanup(self, tmp_filename): (source)

Undocumented

def test_tofile_format(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

def test_tofile_sep(self, tmp_filename, decimal_sep_localization): (source)

Undocumented

def test_uint64_fromstring(self): (source)

Undocumented

def test_unseekable_fromfile(self, x, tmp_filename): (source)

Undocumented

@pytest.fixture(params=['string', 'path_obj'])
def tmp_filename(self, tmp_path, request): (source)

Undocumented

@pytest.fixture()
def x(self): (source)

Undocumented

def _check_from(self, s, value, filename, **kw): (source)

Undocumented