@@ -0,0 +1,1715 @@
+%22%22%22%0ATest unyt.testing module that contains utilities for writing tests.%0A%0A%22%22%22%0A%0A# ----------------------------------------------------------------------------%0A# Copyright (c) 2013, yt Development Team.%0A#%0A# Distributed under the terms of the Modified BSD License.%0A#%0A# The full license is in the file COPYING.txt, distributed with this software.%0A# ----------------------------------------------------------------------------%0A%0Aimport pytest%0A%0Afrom unyt.array import unyt_array, unyt_quantity%0Afrom unyt.testing import assert_allclose_units%0Afrom unyt.exceptions import UnitConversionError%0A%0A%0Adef test_eqaulity():%0A    a1 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    a2 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    assert_allclose_units(a1, a2)%0A%0A%0Adef test_unequal_error():%0A    a1 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    a2 = unyt_array(%5B4.0, 5.0, 6.0%5D, %22cm%22)%0A    with pytest.raises(AssertionError):%0A        assert_allclose_units(a1, a2)%0A%0A%0Adef test_conversion_error():%0A    a1 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    a2 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22kg%22)%0A    with pytest.raises(AssertionError):%0A        assert_allclose_units(a1, a2)%0A%0A%0Adef test_runtime_error():%0A    a1 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    a2 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    with pytest.raises(RuntimeError):%0A        assert_allclose_units(a1, a2, rtol=unyt_quantity(1e-7, %22cm%22))%0A%0A%0Adef test_operation_error():%0A    a1 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    a2 = unyt_array(%5B1.0, 2.0, 3.0%5D, %22cm%22)%0A    with pytest.raises(UnitConversionError):%0A        assert_allclose_units(a1, a2, atol=unyt_quantity(0.0, %22kg%22))%0A%0A%0A# from unyt import assert_allclose_units, m%0A#  actual = %5B1e-5, 1e-3, 1e-1%5D * m%0A#  desired = actual.to(%22cm%22)%0A#  assert_allclose_units(actual, desired)%0A

Add tests for unyt.testing module