Test_sas.py 884 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 TestSAS(UnitTest):
8

9
10
11
12
13
    def test(self):
        parameters = {}
        parameters['atom_selection'] = 'all'
        parameters['frames'] = (0, 2, 1)
        parameters['n_sphere_points'] = 1000
14
        parameters['output_files'] = ('/tmp/output', ['netcdf'])
15
16
17
        parameters['probe_radius'] = 0.14
        parameters['running_mode'] = ('monoprocessor', 1)
        parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
18
19
        job = REGISTRY['job']['sas']()
        self.assertNotRaises(job.run, parameters, status=False)
20

21
22
23
24
25
def suite():
    loader = unittest.TestLoader()
    s = unittest.TestSuite()
    s.addTest(loader.loadTestsFromTestCase(TestSAS))
    return s
26

27
28
if __name__ == '__main__':
    unittest.main(verbosity=2)