Skip to content

Commit

Permalink
[dace] Improve previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
edopao committed Sep 12, 2023
1 parent b4fc385 commit 14346fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
except ModuleNotFoundError:
import sys

if "pytest" in sys.modules:
raise
print("Error, module dace not found", file=sys.stderr)
exit()

Expand Down
7 changes: 7 additions & 0 deletions tests/next_tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from __future__ import annotations

import sys
from dataclasses import dataclass

import pytest
Expand All @@ -27,12 +28,18 @@


try:
import dace

# import dace_iterator only if dace is available
from gt4py.next.program_processors.runners import dace_iterator
except ModuleNotFoundError as e:
if "dace" in str(e):
dace_iterator = None
else:
raise e
finally:
if dace_iterator:
del dace

import next_tests

Expand Down

0 comments on commit 14346fe

Please sign in to comment.