File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ ""
2+ Unit test for the lsl .common .ndp module .
3+ """
4+
5+ import warnings
6+ import unittest
7+ import numpy as np
8+
9+ from lsl.common import ndp
10+ from lsl.common import stations
11+
12+
13+ __version__ = "0.1"
14+ __author__ = "Jayce Dowell"
15+
16+
17+ class ndp_bandpass_tests(unittest.TestCase):
18+ """ A unittest .TestCase collection of unit tests for the lsl .common .ndp
19+ module function for the bandpass ."""
20+
21+ def setUp(self):
22+ """ Turn off all numpy and python warnings ."""
23+
24+ np.seterr(all='ignore')
25+ warnings.simplefilter('ignore')
26+
27+ def test_drx_bandpass(self):
28+ """ Test that the DRX bandpass generator actually runs ."""
29+
30+ fnc = ndp.drx_filter(sample_rate=19.6e6, npts=256)
31+ junk = fnc(1e3)
32+
33+
34+ class ndp_test_suite(unittest.TestSuite):
35+ """ A unittest .TestSuite class which contains all of the lsl .common .ndp
36+ module unit tests ."""
37+
38+ def __init__ (self ):
39+ unittest .TestSuite .__init__ (self )
40+
41+ loader = unittest .TestLoader ()
42+ self .addTests (loader .loadTestsFromTestCase (ndp_bandpass_tests ))
43+
44+
45+ if __name__ == '__main__' :
46+ unittest .main ()
47+
You can’t perform that action at this time.
0 commit comments