File: test_rc.py

package info (click to toggle)
mpi4py 2.0.0-2.1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,680 kB
  • sloc: python: 15,291; ansic: 7,099; makefile: 719; f90: 158; sh: 156; cpp: 121
file content (23 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from mpi4py import rc
import mpiunittest as unittest

class TestRC(unittest.TestCase):

    def testRC1(self):
        rc(initialize   = rc.initialize)
        rc(threads      = rc.threads)
        rc(thread_level = rc.thread_level)
        rc(finalize     = rc.finalize)
        rc(fast_reduce  = rc.fast_reduce)
        rc(recv_mprobe  = rc.recv_mprobe)

    def testRC2(self):
        kwargs = rc.__dict__.copy()
        rc(**kwargs)

    def testRC3(self):
        error = lambda: rc(ABCXYZ=123456)
        self.assertRaises(TypeError, error)

if __name__ == '__main__':
    unittest.main()