-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Wrap Python 3.12 test with a proper test"
This reverts commit b28f82b.
- Loading branch information
Showing
1 changed file
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |