Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# (c) Stefan Countryman, 2019
3"""
4Tests for LLAMA, to be run with ``pytest``.
5"""
7from llama.run import Run
8from llama.utils import TEST_DATA, TEST_EVENT_FILES
10TEST_RUN_INPUTS = Run(rundir=TEST_EVENT_FILES)
13def floateql(a, b, prec=1e-15):
14 """Compares floating point arrays for equality up to some precision."""
15 import numpy as np
16 return all(prec > abs(np.array(a).flatten() - np.array(b).flatten()))
19__all__ = [
20 'TEST_RUN_INPUTS',
21 'TEST_DATA',
22 'TEST_EVENT_FILES',
23]