test_utils

Module Contents

class _GenericTest

Bases:object

_test_equal(self, a, b)
_test_not_equal(self, a, b)
test_array_rank1_eq(self)

Test two equal array of rank 1 are found equal.

test_array_rank1_noteq(self)

Test two different array of rank 1 are found not equal.

test_array_rank2_eq(self)

Test two equal array of rank 2 are found equal.

test_array_diffshape(self)

Test two arrays with different shapes are found not equal.

test_objarray(self)

Test object arrays.

test_array_likes(self)
class TestArrayEqual

Bases:test_utils._GenericTest, unittest.TestCase

setUp(self)
test_generic_rank1(self)

Test rank 1 array for all dtypes.

test_generic_rank3(self)

Test rank 3 array for all dtypes.

test_nan_array(self)

Test arrays with nan values in them.

test_string_arrays(self)

Test two arrays with different shapes are found not equal.

test_recarrays(self)

Test record arrays.

class TestBuildErrorMessage

Bases:unittest.TestCase

test_build_err_msg_defaults(self)
test_build_err_msg_no_verbose(self)
test_build_err_msg_custom_names(self)
test_build_err_msg_custom_precision(self)
class TestEqual

Bases:test_utils.TestArrayEqual

setUp(self)
test_nan_items(self)
test_inf_items(self)
test_non_numeric(self)
test_complex_item(self)
test_negative_zero(self)
test_complex(self)
class TestArrayAlmostEqual

Bases:test_utils._GenericTest, unittest.TestCase

setUp(self)
test_simple(self)
test_nan(self)
test_inf(self)
test_subclass(self)
class TestAlmostEqual

Bases:test_utils._GenericTest, unittest.TestCase

setUp(self)
test_nan_item(self)
test_inf_item(self)
test_simple_item(self)
test_complex_item(self)
test_complex(self)
test_error_message(self)

Check the message is formatted correctly for the decimal value

class TestApproxEqual

Bases:unittest.TestCase

setUp(self)
test_simple_arrays(self)
test_simple_items(self)
test_nan_array(self)
test_nan_items(self)
class TestRaises

Bases:unittest.TestCase

setUp(self)
raises_exception(self, e)
does_not_raise_exception(self)
test_correct_catch(self)
test_wrong_exception(self)
test_catch_no_raise(self)
class TestWarns

Bases:unittest.TestCase

test_warn(self)
test_warn_wrong_warning(self)
class TestAssertAllclose

Bases:unittest.TestCase

test_simple(self)
test_min_int(self)
class TestArrayAlmostEqualNulp

Bases:unittest.TestCase

test_simple(self)
test_simple2(self)
test_big_float32(self)
test_big_float64(self)
test_complex(self)
test_complex2(self)
class TestULP

Bases:unittest.TestCase

test_equal(self)
test_single(self)
test_double(self)
test_inf(self)
test_nan(self)