Skip to content

Commit

Permalink
Revert "Wrap Python 3.12 test with a proper test"
Browse files Browse the repository at this point in the history
This reverts commit b28f82b.
  • Loading branch information
tbennun committed Oct 28, 2024
1 parent b40f4ee commit bceaf39
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/python_frontend/type_statement_test.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved.
# Copyright 2019-2023 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import pytest
import sys

# Check if Python version is 3.12 or higher
if sys.version_info >= (3, 12):
def test_type_statement():

@dace.program
def type_statement():
type Scalar[T] = T
A: Scalar[dace.float32] = 0
return A
# TODO: Investigate why pytest parses the DaCeProgram, even when the test is not supposed to run.
# @pytest.mark.py312
# def test_type_statement():

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

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


if __name__ == '__main__':
if sys.version_info >= (3, 12):
test_type_statement()
# test_type_statement()
pass

0 comments on commit bceaf39

Please sign in to comment.