This file is indexed.

/usr/lib/python2.7/dist-packages/PySPH-1.0a4.dev0-py2.7-linux-x86_64.egg/pysph/parallel/tests/test_parallel.py is in python-pysph 0~20160514.git91867dc-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
"""Tests for the PySPH parallel module"""


import os
import shutil
import tempfile
import unittest
from nose.plugins.attrib import attr
from pysph.tools import run_parallel_script

run_parallel_script.skip_if_no_mpi4py()
path = run_parallel_script.get_directory(__file__)


class ParticleArrayExchangeTestCase(unittest.TestCase):

    @attr(parallel=True)
    def test_lb_exchange(self):
        run_parallel_script.run(filename='lb_exchange.py', nprocs=4, path=path)

    @attr(parallel=True)
    def test_remote_exchange(self):
        run_parallel_script.run(filename='remote_exchange.py', nprocs=4, path=path)


class SummationDensityTestCase(unittest.TestCase):

    @attr(slow=True, parallel=True)
    def test_summation_density(self):
        run_parallel_script.run(filename='summation_density.py', nprocs=4,
                                path=path)


class MPIReduceArrayTestCase(unittest.TestCase):

    def setUp(self):
        self.root = tempfile.mkdtemp()

    def tearDown(self):
        shutil.rmtree(self.root)

    @attr(parallel=True)
    def test_mpi_reduce_array(self):
        run_parallel_script.run(
            filename='reduce_array.py', nprocs=4, path=path
        )

    @attr(parallel=True)
    def test_parallel_reduce(self):
        args = ['--directory=%s'%self.root]
        run_parallel_script.run(
            filename='simple_reduction.py', args=args, nprocs=4, path=path
        )


class DumpLoadTestCase(unittest.TestCase):

    @attr(parallel=True)
    def test_dump_and_load_work_in_parallel(self):
        run_parallel_script.run(
            filename='check_dump_load.py', nprocs=4, path=path
        )


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