Tests specific to np.loadtxt
added during the move of loadtxt to be backed
by C code.
These tests complement those found in test_io.py
.
Class |
|
Undocumented |
Function | mixed |
Fixture providing hetergeneous input data with a structured dtype, along with the associated structured array. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Test exception when a character cannot be encoded as 'S'. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Byte control characters (comments, delimiter) are supported. |
Function | test |
Undocumented |
Function | test |
With the default 'bytes' encoding, tokens are encoded prior to being passed to the converter. This means that the output of the converter may be bytes instead of unicode as expected by read_rows . |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
skiprows and max_rows should raise for negative parameters. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Some tests that the conversion to float64 works as accurately as the Python built-in float function. In a naive version of the float parser, these strings resulted in values that were off by an ULP or two. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Check that the correct unit (e.g. month, day, second) is discovered from the data when a user specifies a unitless datetime. |
Function | test |
Support for quoted fields is disabled by default. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Test that both 'e' and 'E' are parsed correctly. |
Function | test |
Undocumented |
Function | test |
The given dtype is just 'S' or 'U' with no length. In these cases, the length of the resulting dtype is determined by the longest string found in the file. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Check that a UserWarning is emitted when no data is read from input. |
Function | test |
Undocumented |
Fixture providing hetergeneous input data with a structured dtype, along with the associated structured array.
@pytest.mark.parametrize(
@pytest.mark.parametrize(
def test_bad_complex(dtype, field): (source) ¶
Undocumented
def test_bad_ndmin(badval): (source) ¶
Undocumented
def test_bad_newline_in_iterator(data): (source) ¶
Undocumented
def test_blank_lines_spaces_delimit(ws): (source) ¶
Undocumented
@pytest.mark.parametrize(
def test_byteswapping_and_unaligned(dtype, value, swap): (source) ¶
Undocumented
def test_character_not_bytes_compatible(): (source) ¶
Test exception when a character cannot be encoded as 'S'.
def test_collision_with_default_delimiter_raises(ws): (source) ¶
Undocumented
def test_comment_multiple_chars(comment): (source) ¶
Undocumented
@pytest.mark.parametrize(
def test_complex_parsing(dtype, with_parens): (source) ¶
Undocumented
def test_control_character_empty(): (source) ¶
Undocumented
def test_control_character_newline_raises(nl): (source) ¶
Undocumented
With the default 'bytes' encoding, tokens are encoded prior to being
passed to the converter. This means that the output of the converter may
be bytes instead of unicode as expected by read_rows
.
This test checks that outputs from the above scenario are properly decoded
prior to parsing by read_rows
.
def test_converters_dict_raises_non_col_key(bad_col_ind): (source) ¶
Undocumented
def test_converters_dict_raises_non_integer_key(): (source) ¶
Undocumented
@pytest.mark.parametrize(
def test_exception_message_bad_values(dtype): (source) ¶
Undocumented
def test_exception_negative_row_limits(param): (source) ¶
skiprows and max_rows should raise for negative parameters.
def test_exception_noninteger_row_limits(param): (source) ¶
Undocumented
Some tests that the conversion to float64 works as accurately as the
Python built-in float
function. In a naive version of the float parser,
these strings resulted in values that were off by an ULP or two.
def test_good_newline_in_iterator(data): (source) ¶
Undocumented
@pytest.mark.parametrize(
@pytest.mark.filterwarnings(
def test_implicit_cast_float_to_int_fails(dtype): (source) ¶
Undocumented
@pytest.mark.parametrize(
@pytest.mark.filterwarnings(
def test_integer_signs(dtype): (source) ¶
Undocumented
@pytest.mark.parametrize(
def test_large_unicode_characters(c1, c2): (source) ¶
Undocumented
def test_maxrows_no_blank_lines(dtype): (source) ¶
Undocumented
def test_ndmin_single_row_or_col(data, shape): (source) ¶
Undocumented
@pytest.mark.parametrize(
def test_no_thousands_support(dtype): (source) ¶
Undocumented
@pytest.mark.parametrize(
def test_nul_character_error(dtype): (source) ¶
Undocumented
def test_object_cleanup_on_read_error(): (source) ¶
Undocumented
@pytest.mark.parametrize(
def test_parametric_unit_discovery(generic_data, long_datum, unitless_dtype, expected_dtype, nrows): (source) ¶
Check that the correct unit (e.g. month, day, second) is discovered from the data when a user specifies a unitless datetime.
def test_quotechar_multichar_error(): (source) ¶
Undocumented
def test_quoted_field_with_whitepace_delimiter(q): (source) ¶
Undocumented
def test_string_no_length_given(given_dtype, expected_dtype): (source) ¶
The given dtype is just 'S' or 'U' with no length. In these cases, the length of the resulting dtype is determined by the longest string found in the file.
def test_structured_dtype_and_skiprows_no_empty_lines(skiprows, mixed_types_structured): (source) ¶
Undocumented
def test_unicode_whitespace_stripping(dtype): (source) ¶
Undocumented
def test_unicode_whitespace_stripping_complex(dtype): (source) ¶
Undocumented
def test_universal_newlines_quoted(newline): (source) ¶
Undocumented