File: test_pi.py

package info (click to toggle)
python-plac 1.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 620 kB
  • sloc: python: 2,185; lisp: 57; makefile: 30; sh: 20
file content (10 lines) | stat: -rw-r--r-- 227 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
from picalculator import PiCalculator


def test():
    pc = PiCalculator(10, 'T')
    tasks = pc.submit_tasks()
    for task in tasks:
        task.run()
    print(sum(task.result for task in tasks) / pc.n_cpu)
    pc.close()