Test_ssf.py 979 Bytes
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 TestSSF(UnitTest):
8

9
10
11
    def test(self):
        parameters = {}
        parameters['atom_selection'] = 'all'
12
        parameters['atom_transmutation'] = None
13
        parameters['frames'] = (0, 10, 1)
14
        parameters['output_files'] = ('/tmp/output', ['netcdf'])
15
16
17
18
19
        parameters['q_values'] = (0, 10, 1)
        parameters['r_values'] = (0, 10, 1)
        parameters['running_mode'] = ('monoprocessor', 1)
        parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
        parameters['weights'] = 'b_coherent'
20
21
        job = REGISTRY['job']['ssf']()
        self.assertNotRaises(job.run, parameters, status=False)
22

23
24
25
26
27
def suite():
    loader = unittest.TestLoader()
    s = unittest.TestSuite()
    s.addTest(loader.loadTestsFromTestCase(TestSSF))
    return s
28

29
30
if __name__ == '__main__':
    unittest.main(verbosity=2)