Test_vacf.py 1.05 KB
Newer Older
1
2
#!/usr/bin/python

3
import unittest
4
from Tests.UnitTests.UnitTest import UnitTest
5
6
from MDANSE import REGISTRY

7
class TestVACF(UnitTest):
8

9
10
11
12
13
14
15
16
    def test(self):
        parameters = {}
        parameters['atom_selection'] = 'all'
        parameters['atom_transmutation'] = None
        parameters['frames'] = (0, 10, 1)
        parameters['grouping_level'] = 'atom'
        parameters['interpolation_order'] = 'no interpolation'
        parameters['normalize'] = False
17
        parameters['output_files'] = ('/tmp/output', ['netcdf'])
18
19
20
21
        parameters['projection'] = None
        parameters['running_mode'] = ('monoprocessor', 1)
        parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
        parameters['weights'] = 'equal'
22
23
        job = REGISTRY['job']['vacf']()
        self.assertNotRaises(job.run, parameters, status=False)
24

25
26
27
28
29
def suite():
    loader = unittest.TestLoader()
    s = unittest.TestSuite()
    s.addTest(loader.loadTestsFromTestCase(TestVACF))
    return s
30

31
32
if __name__ == '__main__':
    unittest.main(verbosity=2)