File: test_cleanup.py

package info (click to toggle)
rpy 1.0.3-15
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 692 kB
  • ctags: 671
  • sloc: ansic: 2,144; python: 1,592; makefile: 129; sh: 69
file content (23 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from __future__ import nested_scopes

import unittest
import sys
sys.path.insert(1, "..")
import os, os.path

class CleanupTestCase(unittest.TestCase):

    def setUp(self):
        pass
    
    def testCleanup(self):

        # run rpy in a separate process
        os.system("python testscript_cleanup.py")

        # make sure the temp dir has been removed
        tempdir = open('tempdir').read()
        self.failUnless(os.path.exists(tempdir)==False)

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