# Path: dynts/utils/test.py
# def haszoo():
#     def __init__(self, *args, **kwargs):
#     def setUp(self):
#     def tearDown(self):
#     def randomts(self, **kwargs):
#     def getdata(self, size=100, cols=1, delta=1, start=None):
#     def getts(self, returndata=False, delta=1, cols=1, size=100):
#     def timeseries(self, name='', date=None, data=None):
#     def isiterable(self, a):
#     def assertAlmostEqual(self, a, b, places=7, msg=None):
#     def assertEqual(self, exp, recv, msg = None):
#     def check_dates(self, ts, dts):
#     def check_values(self, ts, vals):
#     def _check_vectors(self, v1, v2, equal=True):
# class TestCase(unittest.TestCase):
# 
# Path: dynts/utils/populate.py
# def _generator(x):
#     def __init__(self, data):
#     def __iter__(self):
# def datepopulate(size = 10, start=None, delta=1):
# def populate(size=100, cols=1, generator=None):
# def polygen(*coefficients):
#         def _(i):
# class gdata(object):


import dynts
from dynts.utils import test
from dynts.utils.populate import randomts



class TestNames(test.TestCase):

    def testtsname(self):
        name = dynts.tsname('test')
        self.assertEqual(name, 'test')
        name = dynts.tsname('test', 'ping', 'pong')
        self.assertEqual(name, 'test__ping__pong')

    def testDataName(self):
        ts = randomts(100, 3, name='test')
        self.assertEqual(ts.name, 'test')
        self.assertEqual(ts.names(), ['test', 'unnamed1', 'unnamed2'])
        ts.name = dynts.tsname('test', 'ping')
        self.assertEqual(ts.names(), ['test', 'ping', 'unnamed1'])

    def testDataNameFull(self):
        names = dynts.tsname('test', 'ciao', 'ping')

# Path: dynts/utils/test.py
# def haszoo():
#     def __init__(self, *args, **kwargs):
#     def setUp(self):
#     def tearDown(self):
#     def randomts(self, **kwargs):
#     def getdata(self, size=100, cols=1, delta=1, start=None):
#     def getts(self, returndata=False, delta=1, cols=1, size=100):
#     def timeseries(self, name='', date=None, data=None):
#     def isiterable(self, a):
#     def assertAlmostEqual(self, a, b, places=7, msg=None):
#     def assertEqual(self, exp, recv, msg = None):
#     def check_dates(self, ts, dts):
#     def check_values(self, ts, vals):
#     def _check_vectors(self, v1, v2, equal=True):
# class TestCase(unittest.TestCase):
# 
# Path: dynts/utils/populate.py
# def _generator(x):
#     def __init__(self, data):
#     def __iter__(self):
# def datepopulate(size = 10, start=None, delta=1):
# def populate(size=100, cols=1, generator=None):
# def polygen(*coefficients):
#         def _(i):
# class gdata(object):


# Path: tests/unit/names.py
import dynts
from dynts.utils import test
from dynts.utils.populate import randomts



class TestNames(test.TestCase):

    def testtsname(self):
        name = dynts.tsname('test')
        self.assertEqual(name, 'test')
        name = dynts.tsname('test', 'ping', 'pong')
        self.assertEqual(name, 'test__ping__pong')

    def testDataName(self):
        ts = randomts(100, 3, name='test')
        self.assertEqual(ts.name, 'test')
        self.assertEqual(ts.names(), ['test', 'unnamed1', 'unnamed2'])
        ts.name = dynts.tsname('test', 'ping')
        self.assertEqual(ts.names(), ['test', 'ping', 'unnamed1'])

    def testDataNameFull(self):
        names = dynts.tsname('test', 'ciao', 'ping')

        ts = randomts(100, 3, name=names)
