예제 #1
0
파일: test.py 프로젝트: damoxc/encore
 def setUp(self):
     """
     Set up the basic file I/O requirements.
     """
     self.test_dir = tempfile.mkdtemp(prefix='encore-tests+')
     self.test_cfg_dir = tempfile.mkdtemp(prefix='encore-tests+')
     self.config = Config()
     self.config.test_dir = self.test_cfg_dir
     self.config.initialize()
     self.data_dir = os.path.dirname(__file__) + '/data'
예제 #2
0
파일: test.py 프로젝트: damoxc/encore
class EncoreTest(unittest.TestCase):
    """
    Test for use in the Encore test suite.
    """

    def setUp(self):
        """
        Set up the basic file I/O requirements.
        """
        self.test_dir = tempfile.mkdtemp(prefix='encore-tests+')
        self.test_cfg_dir = tempfile.mkdtemp(prefix='encore-tests+')
        self.config = Config()
        self.config.test_dir = self.test_cfg_dir
        self.config.initialize()
        self.data_dir = os.path.dirname(__file__) + '/data'

    def tearDown(self):
        """
        Remove the temporary files created in the test.
        """
        shutil.rmtree(self.test_dir)
        shutil.rmtree(self.test_cfg_dir)