32 lines
582 B
Python
32 lines
582 B
Python
"""Test of data module.
|
|
|
|
:Date: 2019-06-12
|
|
|
|
.. module:: test_data
|
|
:platform: *nix, Windows
|
|
:synopsis: Test of data module.
|
|
|
|
.. moduleauthor:: Daniel Weschke <daniel.weschke@directbox.de>
|
|
"""
|
|
import unittest
|
|
|
|
import os
|
|
import sys
|
|
sys.path.insert(0, os.path.abspath('../src'))
|
|
from data import data_read
|
|
|
|
|
|
class TestFit(unittest.TestCase):
|
|
|
|
def test_read(self):
|
|
"""test read function"""
|
|
file_name = "test_fit.dat"
|
|
x, y = data_read(file_name, 3, 2)
|
|
|
|
self.assertEqual(len(x), 1027)
|
|
self.assertEqual(len(y), 1027)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|