Skip to content

Commit 0dd52c4

Browse files
committed
Merged PR 308202: Add test to test get and set num threads
Add test to test get and set num threads Related work items: #605420
2 parents a72c034 + 2478f4c commit 0dd52c4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/test_parallel.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""Verify all examples can be accessed or downloaded"""
2+
import pytest
3+
4+
from ansys.dpf import core as dpf
5+
6+
def test_num_threads():
7+
op = dpf.operators.averaging.elemental_nodal_to_nodal_fc()
8+
c = op.config
9+
nOrg = c.get_num_threads_option()
10+
assert nOrg == '0' # defaults to 0
11+
c.set_num_threads_option(5)
12+
op.config = c
13+
assert op.config.get_num_threads_option() == '5'

0 commit comments

Comments
 (0)