Skip to content

Commit

Permalink
Add test for Variable without init value (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
a5kin committed Mar 2, 2019
1 parent 59ba8c5 commit 0f10fa8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/core/test_variables.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Tests for ``xentica.core.variables`` module."""
import unittest

from xentica.core.variables import IntegerVariable
from xentica.core.variables import Variable, IntegerVariable
from xentica.core.exceptions import XenticaException
from xentica import core

Expand Down Expand Up @@ -58,3 +58,8 @@ def emit(self):
"""Try to assign to DeferredExpression"""
deferred_exp = 1 + self.intvar
deferred_exp += 1

def test_no_init_val(self):
"""Test initialization without initial value."""
with self.assertRaises(XenticaException):
Variable()

0 comments on commit 0f10fa8

Please sign in to comment.