#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_eegfaster
----------------------------------

Tests for `eegfaster` module.
"""

import pytest
import numpy as np
from eegfaster import eegfaster


@pytest.fixture(scope='module')
def data():
    """
    Randomly generates data
    """

    # Some direct accessed for readability
    urnd = np.random.uniform
    nrnd = np.random.normal

    # A controlled experiment will be created with C components containing L
    # time samples and E events.
    C = 100
    L = 1000
    E = 10

    # Time vector
    t = np.linspace(0, 10, E*L)

    # Generator: Original components
    comp_fcn = lambda n: \
        urnd(-1, 1, 1)*np.cos(urnd(0, 1, 1)*n) + \
        urnd(-1, 1, 1)*np.sin(urnd(0, 1, 1)*n)