Skip to content

Commit 16175e4

Browse files
committed
Enable annotation output tests
1 parent 5d6022b commit 16175e4

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
python-version: ["3.6", "3.10", "pypy3"]
1515

1616
env:
17-
MINIZINC_URL: https://github.com/MiniZinc/MiniZincIDE/releases/download/2.6.3/MiniZincIDE-2.6.3-x86_64.AppImage
17+
MINIZINC_URL: https://github.com/MiniZinc/MiniZincIDE/releases/download/2.6.4/MiniZincIDE-2.6.4-x86_64.AppImage
1818
steps:
1919
- uses: actions/checkout@v3
2020
with:

tests/test_types.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,15 @@ def test_npint64(self):
222222
assert result.status is Status.SATISFIED
223223

224224

225-
# Enable on MiniZinc 2.6+ (JSON output of annotations is broken before then)
226-
# class TestAnn(InstanceTestCase):
227-
# def test_ann_atom(self):
228-
# self.instance.add_string("ann: x :: add_to_output = promise_total;")
229-
# result = self.instance.solve()
230-
# assert result.status is Status.SATISFIED
231-
# assert result["x"] == "promise_total"
232-
233-
# def test_ann_call(self):
234-
# self.instance.add_string(
235-
# 'ann: x :: add_to_output = expression_name("test");')
236-
# result = self.instance.solve()
237-
# assert result.status is Status.SATISFIED
238-
# assert result["x"] == 'expression_name("test")'
225+
class TestAnn(InstanceTestCase):
226+
def test_ann_atom(self):
227+
self.instance.add_string("ann: x :: add_to_output = promise_total;")
228+
result = self.instance.solve()
229+
assert result.status is Status.SATISFIED
230+
assert result["x"] == "promise_total"
231+
232+
def test_ann_call(self):
233+
self.instance.add_string('ann: x :: add_to_output = expression_name("test");')
234+
result = self.instance.solve()
235+
assert result.status is Status.SATISFIED
236+
assert result["x"] == 'expression_name("test")'

0 commit comments

Comments
 (0)