Esempio n. 1
0
class testZip(unittest.TestCase):
    
    def setUp(self):
        self.L=Registry()
        
        # Create module
        import zipfile
        z = zipfile.PyZipFile("plugins.zip", 'w')
        z.writepy("../plugins", "")
        z.close()
        
    def testplugin_checksetup(self):
        """ 
            Check that the test is valid by confirming
            that the file can't be loaded without the
            plugins
        """
        self.assertRaises(ValueError, self.L.load, 'test_data.test')
        
    def testplugin(self):
        """ 
            test loading with a test reader only 
            found in the plugins directory
        """
        self.L.find_plugins('.')
        output = self.L.load('test_data.test')
        self.assertEqual(output.x[0], 1234.)
        self.assertTrue(self.L.loaders.has_key('.test'))
Esempio n. 2
0
class testZip(unittest.TestCase):
    def setUp(self):
        self.L = Registry()

        # Create module
        import zipfile
        z = zipfile.PyZipFile("plugins.zip", 'w')
        z.writepy("../plugins", "")
        z.close()

    def testplugin_checksetup(self):
        """ 
            Check that the test is valid by confirming
            that the file can't be loaded without the
            plugins
        """
        self.assertRaises(ValueError, self.L.load, 'test_data.test')

    def testplugin(self):
        """ 
            test loading with a test reader only 
            found in the plugins directory
        """
        self.L.find_plugins('.')
        output = self.L.load('test_data.test')
        self.assertEqual(output.x[0], 1234.)
        self.assertTrue(self.L.loaders.has_key('.test'))
Esempio n. 3
0
    def setUp(self):
        self.L = Registry()

        # Create module
        import zipfile
        z = zipfile.PyZipFile("plugins.zip", 'w')
        z.writepy("../plugins", "")
        z.close()
Esempio n. 4
0
class testRegistry(unittest.TestCase):
    def setUp(self):
        self.L = Registry()
        self.L.find_plugins('../plugins')

    def testplugin(self):
        """ 
            test loading with a test reader only 
            found in the plugins directory
        """
        output = self.L.load('test_data.test')
        self.assertEqual(output.x[0], 1234.)
        self.assertTrue(self.L.loaders.has_key('.test'))
Esempio n. 5
0
class testRegistry(unittest.TestCase):
    
    def setUp(self):
        self.L=Registry()
        self.L.find_plugins('../plugins')
            
    def testplugin(self):
        """ 
            test loading with a test reader only 
            found in the plugins directory
        """
        output = self.L.load('test_data.test')
        self.assertEqual(output.x[0], 1234.)
        self.assertTrue(self.L.loaders.has_key('.test'))
Esempio n. 6
0
 def setUp(self):
     self.L=Registry()
     
     # Create module
     import zipfile
     z = zipfile.PyZipFile("plugins.zip", 'w')
     z.writepy("../plugins", "")
     z.close()
Esempio n. 7
0
 def setUp(self):
     self.L = Registry()
     self.L.find_plugins('../plugins')
Esempio n. 8
0
 def setUp(self):
     self.L=Registry()
     self.L.find_plugins('../plugins')