File: test_variable.py

package info (click to toggle)
pplpy 0.8.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 532 kB
  • sloc: python: 306; makefile: 39; cpp: 21; sh: 2
file content (11 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
import unittest

from ppl import Variable

class TestVariable(unittest.TestCase):
    def test_creation_valid(self):
        Variable(0)
    
    def test_creation_invalid(self):
        self.assertRaises(OverflowError, Variable, -1)
        self.assertRaises(TypeError, Variable, "hello")