Skip to content

Commit fdbc474

Browse files
committed
Move one test to other file
1 parent dfade53 commit fdbc474

File tree

2 files changed

+78
-63
lines changed

2 files changed

+78
-63
lines changed

.github/workflows/tests.yml

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -223,69 +223,69 @@ jobs:
223223
echo "COVERAGE=--cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --log-level=ERROR --cov-append" >> $GITHUB_ENV
224224
echo "RERUNS=--reruns 2 --reruns-delay 1" >> $GITHUB_ENV
225225
226-
- name: "Test API"
227-
shell: bash
228-
working-directory: tests
229-
run: |
230-
pytest $DEBUG $COVERAGE $RERUNS --junitxml=junit/test-results.xml .
231-
if: always()
232-
233-
- name: "Kill all servers"
234-
uses: ansys/pydpf-actions/[email protected]
235-
if: always()
236-
237-
- name: "Test API test_launcher"
238-
uses: nick-fields/retry@v2
239-
with:
240-
timeout_minutes: 2
241-
max_attempts: 2
242-
shell: bash
243-
command: |
244-
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results2.xml test_launcher/.
245-
246-
- name: "Kill all servers"
247-
uses: ansys/pydpf-actions/[email protected]
248-
if: always()
249-
250-
- name: "Test API test_server"
251-
uses: nick-fields/retry@v2
252-
with:
253-
timeout_minutes: 5
254-
max_attempts: 2
255-
shell: bash
256-
command: |
257-
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results3.xml test_server/.
258-
if: always()
259-
260-
- name: "Kill all servers"
261-
uses: ansys/pydpf-actions/[email protected]
262-
if: always()
263-
264-
- name: "Test API test_local_server"
265-
uses: nick-fields/retry@v2
266-
with:
267-
timeout_minutes: 2
268-
max_attempts: 2
269-
shell: bash
270-
command: |
271-
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results4.xml test_local_server/.
272-
273-
- name: "Kill all servers"
274-
uses: ansys/pydpf-actions/[email protected]
275-
if: always()
276-
277-
- name: "Test API test_multi_server"
278-
uses: nick-fields/retry@v2
279-
with:
280-
timeout_minutes: 5
281-
max_attempts: 2
282-
shell: bash
283-
command: |
284-
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results5.xml test_multi_server/.
285-
286-
- name: "Kill all servers"
287-
uses: ansys/pydpf-actions/[email protected]
288-
if: always()
226+
# - name: "Test API"
227+
# shell: bash
228+
# working-directory: tests
229+
# run: |
230+
# pytest $DEBUG $COVERAGE $RERUNS --junitxml=junit/test-results.xml .
231+
# if: always()
232+
233+
# - name: "Kill all servers"
234+
# uses: ansys/pydpf-actions/[email protected]
235+
# if: always()
236+
237+
# - name: "Test API test_launcher"
238+
# uses: nick-fields/retry@v2
239+
# with:
240+
# timeout_minutes: 2
241+
# max_attempts: 2
242+
# shell: bash
243+
# command: |
244+
# pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results2.xml test_launcher/.
245+
246+
# - name: "Kill all servers"
247+
# uses: ansys/pydpf-actions/[email protected]
248+
# if: always()
249+
250+
# - name: "Test API test_server"
251+
# uses: nick-fields/retry@v2
252+
# with:
253+
# timeout_minutes: 5
254+
# max_attempts: 2
255+
# shell: bash
256+
# command: |
257+
# pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results3.xml test_server/.
258+
# if: always()
259+
260+
# - name: "Kill all servers"
261+
# uses: ansys/pydpf-actions/[email protected]
262+
# if: always()
263+
264+
# - name: "Test API test_local_server"
265+
# uses: nick-fields/retry@v2
266+
# with:
267+
# timeout_minutes: 2
268+
# max_attempts: 2
269+
# shell: bash
270+
# command: |
271+
# pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results4.xml test_local_server/.
272+
273+
# - name: "Kill all servers"
274+
# uses: ansys/pydpf-actions/[email protected]
275+
# if: always()
276+
277+
# - name: "Test API test_multi_server"
278+
# uses: nick-fields/retry@v2
279+
# with:
280+
# timeout_minutes: 5
281+
# max_attempts: 2
282+
# shell: bash
283+
# command: |
284+
# pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results5.xml test_multi_server/.
285+
286+
# - name: "Kill all servers"
287+
# uses: ansys/pydpf-actions/[email protected]
288+
# if: always()
289289

290290
- name: "Test API test_remote_workflow"
291291
uses: nick-fields/retry@v2

tests/test_remote_workflow.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,3 +633,18 @@ def test_distributed_workflows_integral_types():
633633
fwd2.inputs.connect(fwd1.outputs)
634634

635635
fwd2.get_output(0, data["type"])
636+
637+
@pytest.mark.skipif(
638+
not conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_3_0,
639+
reason="Connecting data from different servers is " "supported starting server version 3.0",
640+
)
641+
def test_connect_remote_operators(simple_bar):
642+
print(core.core.misc.get_ansys_path())
643+
data_sources1 = core.DataSources(simple_bar)
644+
op1 = ops.result.displacement(data_sources=data_sources1)
645+
print(local_servers[0])
646+
data_sources2 = core.DataSources(simple_bar, server=local_servers[0])
647+
op2 = ops.result.displacement(data_sources=data_sources2, server=local_servers[0])
648+
add = ops.math.add_fc(op1, op2)
649+
fc = add.outputs.fields_container()
650+
assert np.allclose(fc[0].data, 2 * op1.outputs.fields_container()[0].data)

0 commit comments

Comments
 (0)