# Path: hftools/testing/common.py
# class TestCase(unittest.TestCase):
#     def assertAllclose(self, a, b, rtol=1e-05, atol=1e-08, msg=None):
#     def assertIsNotInstance(self, obj, cls):
#     def assertIsInstance(self, obj, cls, msg=None):
#     def assertHFToolsWarning(self, funk, *k, **kw):
#     def assertHFToolsDeprecationWarning(self, funk, *k, **kw):
# def get_label():
# def make_load_tests(module):
#     def load_tests(loader, standard_tests, pattern):
# def _random_array(shape):
# def random_array(N, maxsize=6, minsize=1):
# def random_complex_array(N, maxsize=6, minsize=1):
# def random_value_array_from_dims(dims, mean=0, scale=1):
# def random_value_array(N, maxsize, minsize=1):
# def random_complex_value_array(N, maxsize, minsize=1):
# def random_dims(N, maxsize, minsize=1):
# def random_complex_matrix(N, maxsize, minsize=1, Nmatrix=2, Nmatrixj=None):
# def SKIP(self):  # pragma: no cover
# _IDX = 1
# 
# Path: hftools/testing/common.py
# def random_value_array(N, maxsize, minsize=1):
#     dims = random_dims(N, maxsize, minsize)
#     return random_value_array_from_dims(dims)
# 
# def random_complex_value_array(N, maxsize, minsize=1):
#     dims = random_dims(N, maxsize, minsize)
#     return (random_value_array_from_dims(dims) +
#             random_value_array_from_dims(dims) * 1j)
# 
# @skip("Skipping")
# def SKIP(self):  # pragma: no cover
#     pass


import os
import pdb
import numpy as np
import hftools.dataset.arrayobj as aobj
import hftools.dataset.dim as dim
import hftools.dataset as ds
from numpy import newaxis
from hftools.testing import TestCase, skip, make_load_tests
from hftools.testing import random_value_array, random_complex_value_array,\
    SKIP

    def test_2(self):
        res = aobj.axis_handler(self.a, "ai")
        self.assertEqual(res, self.ai)

    def test_3(self):
        res = aobj.axis_handler(self.abc, 2)
        self.assertEqual(res, self.bi)

    def test_4(self):
        res = aobj.axis_handler(self.abc, dim.DimRep)
        self.assertEqual(res, self.bi)

    def test_5(self):
        res = aobj.axis_handler(self.abc, self.bi)
        self.assertEqual(res, self.bi)

    def test_error_1(self):
        self.assertRaises(IndexError, aobj.axis_handler,
                          self.abc, dim.DimAnonymous)

    def test_error_2(self):
        self.assertRaises(IndexError, aobj.axis_handler,
                          self.abc, dim.DimSweep)

    def test_error_3(self):
        self.assertRaises(IndexError, aobj.axis_handler,
                          self.a, self.ci)



# Path: hftools/testing/common.py
# class TestCase(unittest.TestCase):
#     def assertAllclose(self, a, b, rtol=1e-05, atol=1e-08, msg=None):
#     def assertIsNotInstance(self, obj, cls):
#     def assertIsInstance(self, obj, cls, msg=None):
#     def assertHFToolsWarning(self, funk, *k, **kw):
#     def assertHFToolsDeprecationWarning(self, funk, *k, **kw):
# def get_label():
# def make_load_tests(module):
#     def load_tests(loader, standard_tests, pattern):
# def _random_array(shape):
# def random_array(N, maxsize=6, minsize=1):
# def random_complex_array(N, maxsize=6, minsize=1):
# def random_value_array_from_dims(dims, mean=0, scale=1):
# def random_value_array(N, maxsize, minsize=1):
# def random_complex_value_array(N, maxsize, minsize=1):
# def random_dims(N, maxsize, minsize=1):
# def random_complex_matrix(N, maxsize, minsize=1, Nmatrix=2, Nmatrixj=None):
# def SKIP(self):  # pragma: no cover
# _IDX = 1
# 
# Path: hftools/testing/common.py
# def random_value_array(N, maxsize, minsize=1):
#     dims = random_dims(N, maxsize, minsize)
#     return random_value_array_from_dims(dims)
# 
# def random_complex_value_array(N, maxsize, minsize=1):
#     dims = random_dims(N, maxsize, minsize)
#     return (random_value_array_from_dims(dims) +
#             random_value_array_from_dims(dims) * 1j)
# 
# @skip("Skipping")
# def SKIP(self):  # pragma: no cover
#     pass


# Path: hftools/dataset/tests/test_arrayobj_funcs.py
import os
import pdb
import numpy as np
import hftools.dataset.arrayobj as aobj
import hftools.dataset.dim as dim
import hftools.dataset as ds
from numpy import newaxis
from hftools.testing import TestCase, skip, make_load_tests
from hftools.testing import random_value_array, random_complex_value_array,\
    SKIP


    def test_2(self):
        res = aobj.axis_handler(self.a, "ai")
        self.assertEqual(res, self.ai)

    def test_3(self):
        res = aobj.axis_handler(self.abc, 2)
        self.assertEqual(res, self.bi)

    def test_4(self):
        res = aobj.axis_handler(self.abc, dim.DimRep)
        self.assertEqual(res, self.bi)

    def test_5(self):
        res = aobj.axis_handler(self.abc, self.bi)
        self.assertEqual(res, self.bi)

    def test_error_1(self):
        self.assertRaises(IndexError, aobj.axis_handler,
                          self.abc, dim.DimAnonymous)

    def test_error_2(self):
        self.assertRaises(IndexError, aobj.axis_handler,
                          self.abc, dim.DimSweep)

    def test_error_3(self):
        self.assertRaises(IndexError, aobj.axis_handler,
                          self.a, self.ci)



class Test_multiple_axis_handler(TestCase):