def testFindTests(self):
     """check findTests method to find all tests inside a plugin."""
     tests = findTests(path=[os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data')], prefix='data.')
     test_names = [utw.name for utw in tests]
     self.assertIn('Test that fails', test_names)
     self.assertIn('Test that passes', test_names)
     self.assertIn('Functional test', test_names)
示例#2
0
    def setUpClass(cls):
        cls.QGIS_APP = start_app(cleanup=False)
        assert cls.QGIS_APP is not None
        cls.IFACE_Mock = get_iface()
        assert cls.IFACE_Mock is not None

        testPluginPath = os.path.abspath('data')
        cls.tests = findTests(path=[testPluginPath], prefix='')
示例#3
0
 def setUpClass(cls):
     """Test setUp method."""
     utilities.setUpEnv()
     cls.QGIS_APP = start_app()
     assert cls.QGIS_APP is not None
     cls.IFACE_Mock = get_iface()
     assert cls.IFACE_Mock is not None
     # get test data
     testPluginPath = os.path.abspath('data')
     cls.tests = findTests(path=[testPluginPath], prefix='')