diff options
author | elie <elie> | 2012-11-23 15:33:37 +0000 |
---|---|---|
committer | elie <elie> | 2012-11-23 15:33:37 +0000 |
commit | da3ec56bca35f114183613ebfeb534df3dace4e8 (patch) | |
tree | c27ebaf31d24d94e99057640c6f536c985ee67d5 /test | |
parent | ff137cd24aa250e963580d1baa350a0bd654169c (diff) | |
download | pyasn1-da3ec56bca35f114183613ebfeb534df3dace4e8.tar.gz |
two more Boolean tests added
Diffstat (limited to 'test')
-rw-r--r-- | test/type/univ.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/type/univ.py b/test/type/univ.py index e9630bf..7b9a046 100644 --- a/test/type/univ.py +++ b/test/type/univ.py @@ -47,6 +47,10 @@ class IntegerTestCase(unittest.TestCase): assert str(i) != 'asn1', 'named val __str__() fails' class BooleanTestCase(unittest.TestCase): + def testTruth(self): + assert univ.Boolean(True) and univ.Boolean(1), 'Truth initializer fails' + def testFalse(self): + assert not univ.Boolean(False) and not univ.Boolean(0), 'False initializer fails' def testStr(self): assert str(univ.Boolean(1)) in ('1', '1L'), 'str() fails' def testTag(self): |