Skip to content

Commit

Permalink
Added py312 mark.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnick83 committed Oct 9, 2023
1 parent 52002ac commit 6c90205
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ markers =
scalapack: Test requires ScaLAPACK (Intel MKL and OpenMPI). (select with '-m scalapack')
datainstrument: Test uses data instrumentation (select with '-m datainstrument')
hptt: Test requires the HPTT library (select with '-m "hptt')
py312: Test requires Python 3.12 or later (select with '-m "py312"')
python_files =
*_test.py
*_cudatest.py
Expand Down
22 changes: 8 additions & 14 deletions tests/python_frontend/type_statement_test.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
# Copyright 2019-2023 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import pytest
import sys


@pytest.mark.py312
def test_type_statement():

if sys.version_info >= (3, 12):

@dace.program
def type_statement():
type Scalar[T] = T
A: Scalar[dace.float32] = 0
return A

with pytest.raises(dace.frontend.python.common.DaceSyntaxError):
type_statement()
@dace.program
def type_statement():
type Scalar[T] = T
A: Scalar[dace.float32] = 0
return A

else:

assert True
with pytest.raises(dace.frontend.python.common.DaceSyntaxError):
type_statement()


if __name__ == '__main__':
Expand Down

0 comments on commit 6c90205

Please sign in to comment.