Example #1
0
 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'
Example #2
0
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)