File: test_boolean.py

package info (click to toggle)
rpy 0.4.1-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,988 kB
  • ctags: 14,206
  • sloc: ansic: 15,392; python: 977; makefile: 406; sh: 28
file content (21 lines) | stat: -rw-r--r-- 476 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from __future__ import nested_scopes

import unittest
import sys
sys.path.insert(1, "..")
from rpy import *
import sys


class BooleanTestCase(unittest.TestCase):

    def testTRUE(self):
        self.failUnless(r.typeof(r.TRUE) == 'logical' and
                        r.as_logical(r.TRUE))

    def testFALSE(self):
        self.failUnless(r.typeof(r.FALSE) == 'logical' and
                        not r.as_logical(r.FALSE))

if __name__ == '__main__':
    unittest.main()