def assert_table_equal(a, b, is_copy=True, meta=False, check_types=True,<EOL>almost_equal=False):
<EOL>assert sorted(a.colnames) == sorted(b.colnames)<EOL>if meta:<EOL><INDENT>assert a.meta == b.meta<EOL><DEDENT>if almost_equal:<EOL><INDENT>assert_array = assert_allclose<EOL><DEDENT>else:<EOL><INDENT>assert_array = assert_array_equal<EOL><DEDENT>for name in a.colnames:<EOL><INDENT>cola = a[name]<EOL>colb = b[name]<EOL>if check_types:<EOL><INDENT>assert cola.dtype == colb.dtype<EOL><DEDENT>assert_array(cola, colb)<EOL><DEDENT>for name in a.colnames:<EOL><INDENT>assert numpy.may_share_memory(a[name], b[name]) is not is_copy<EOL><DEDENT>
Assert that two tables store the same information