taichi._testing

Module Contents

Functions

get_rel_eps()

approx(expected, **kwargs)

Tweaked pytest.approx for OpenGL low precisions

allclose(x, y, **kwargs)

Same as: x == approx(y, **kwargs)

make_temp_file(*args, **kwargs)

Create a temporary file

test(arch=None, exclude=None, require=None, **options)

Performs tests on archs in expected_archs() which are in arch and not in exclude and satisfy require

taichi._testing.get_rel_eps()
taichi._testing.approx(expected, **kwargs)

Tweaked pytest.approx for OpenGL low precisions

taichi._testing.allclose(x, y, **kwargs)

Same as: x == approx(y, **kwargs)

taichi._testing.make_temp_file(*args, **kwargs)

Create a temporary file

taichi._testing.test(arch=None, exclude=None, require=None, **options)

Performs tests on archs in expected_archs() which are in arch and not in exclude and satisfy require

ti.test(arch=[], exclude=[], require=[], **options)
Parameters
  • arch – backends to include

  • exclude – backends to exclude

  • require – extensions required

  • options – other options to be passed into ti.init