1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
import pytest
from parsl import python_app
from parsl.tests.configs.htex_local import fresh_config as local_config
@python_app
def compute_descript(size=1000):
import numpy as np
x = np.array(list(range(0, size)), dtype=complex).astype(np.float32)
return x
@pytest.mark.local
def test_1653():
""" Check if #1653 works correctly
"""
x = compute_descript(size=100).result()
assert x.shape == (100,), "Got incorrect numpy shape"
x = compute_descript(size=1000).result()
assert x.shape == (1000,), "Got incorrect numpy shape"
|