예제 #1
0
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(ParseConnectionStringTestCase, 'test'))
    suite.addTest(unittest.makeSuite(StringsTestCase, 'test'))
    suite.addTest(unittest.makeSuite(ConnectionTestCase, 'test'))
    suite.addTest(unittest.makeSuite(WithTransactionTest, 'test'))
    return suite
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(TestBaseValidators))
    suite.addTest(makeSuite(TestCustomValidators))
    suite.addTest(makeSuite(TestCustomValidatorMessages))
    return suite
예제 #3
0
파일: cache.py 프로젝트: good1111/pj-redis
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(SimpleCacheTestCase))
    suite.addTest(unittest.makeSuite(FileSystemCacheTestCase))
    if redis is not None:
        suite.addTest(unittest.makeSuite(RedisCacheTestCase))
    return suite
예제 #4
0
def suite():
    suite = unittest.TestSuite()
    suite.addTests(unittest.makeSuite(ReviewSearchApiTest))
    suite.addTests(unittest.makeSuite(PhoneApiTest))
    suite.addTests(unittest.makeSuite(NeighborhoodApiTest))

    return suite    
def test_suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(BlockTestCase))
    suite.addTest(unittest.makeSuite(ReferenceBlockTestCase))
    suite.addTest(unittest.makeSuite(TextBlockTestCase))
    suite.addTest(unittest.makeSuite(BlockSlotTestCase))
    return suite
예제 #6
0
def test_suite():
    return unittest.TestSuite((
        unittest.makeSuite(ActionIconsToolExportConfiguratorTests),
        unittest.makeSuite(ActionIconsToolImportConfiguratorTests),
        unittest.makeSuite(Test_exportActionIconsTool),
        unittest.makeSuite(Test_importActionIconsTool),
        ))
예제 #7
0
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(TestHeaderSet))
    suite.addTest(makeSuite(TestHeaderSetMethods))
    suite.addTest(makeSuite(TestHeaderSetOld))
    return suite
예제 #8
0
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(testSkinsTool))
     suite.addTest(unittest.makeSuite(testResourceRegistrations))
     suite.addTest(unittest.makeSuite(testDisplayViewsRegistration))
     suite.addTest(unittest.makeSuite(testUninstall))
     return suite
예제 #9
0
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(ConfigurableTicketWorkflowTestCase))
    suite.addTest(unittest.makeSuite(ResetActionTestCase))
    suite.addTest(unittest.makeSuite(SetOwnerAttributeTestCase))
    suite.addTest(unittest.makeSuite(RestrictOwnerTestCase))
    return suite
예제 #10
0
파일: test.py 프로젝트: chiehwen/pynag
def suite():
    suite = unittest.TestSuite()

    # Include tests of Model
    suite.addTest(unittest.makeSuite(testModel))

    # Include tests of Parsers
    suite.addTest(unittest.makeSuite(testParsers))

    # Include commandline tests like the one in ../scripts/plugintest
    suite.addTest(unittest.makeSuite(testsFromCommandLine))

    # Include doctests in the Plugins Module
    suite.addTests( doctest.DocTestSuite(pynag.Plugins) )

    # Include doctests in the Parsers Module
    suite.addTests( doctest.DocTestSuite(pynag.Parsers) )

    # Include doctests in the Model Module
    suite.addTests( doctest.DocTestSuite(pynag.Model) )

    # Include doctests in the Utils Module
    suite.addTests( doctest.DocTestSuite(pynag.Utils) )

    return suite
예제 #11
0
def test_suite():
    return unittest.TestSuite((
        unittest.makeSuite(NegotiatorBaseTest),
        unittest.makeSuite(NegotiatorTest),
        DocFileSuite('README.txt',
            optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
        ))
예제 #12
0
def suite():
    suite1 = unittest.makeSuite(TestFromOpenURL, 'test')
    suite2 = unittest.makeSuite(TestToOpenURL, 'test')
    suite3 = unittest.makeSuite(TestFromDict, 'test')
    suite4 = unittest.makeSuite(TestThesisToOpenURL, 'test')
    all = unittest.TestSuite((suite1, suite2, suite3, suite4))
    return all
예제 #13
0
파일: ext.py 프로젝트: 1ncnspcuous/WebPutty
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(ExtensionsTestCase))
    suite.addTest(unittest.makeSuite(InternationalizationTestCase))
    suite.addTest(unittest.makeSuite(NewstyleInternationalizationTestCase))
    suite.addTest(unittest.makeSuite(AutoEscapeTestCase))
    return suite
예제 #14
0
def test_suite():
    from doctest import DocTestSuite
    suite = unittest.TestSuite()
    suite.addTest(DocTestSuite('zope.pagetemplate.engine'))
    suite.addTest(unittest.makeSuite(EngineTests))
    suite.addTest(unittest.makeSuite(ZopePythonExprTests))
    return suite
예제 #15
0
def test_suite():
    return unittest.TestSuite((
        unittest.makeSuite(MailHostExportConfiguratorTests),
        unittest.makeSuite(MailHostImportConfiguratorTests),
        unittest.makeSuite(Test_exportMailHost),
        unittest.makeSuite(Test_importMailHost),
        ))
예제 #16
0
def AddTests(suite, test):
    if isinstance(test, ModuleType):
        for entry in test.__dict__.values():
            if IsTestCase(entry):
                suite.addTests(unittest.makeSuite(entry))
    elif IsTestCase(test):
        suite.addTests(unittest.makeSuite(test))
def SuiteTest():
    suite = test.TestSuite()
    suite.addTest(test.makeSuite(TesteTV))
    suite.addTest(test.makeSuite(TesteSOM))
    suite.addTest(test.makeSuite(TesteResidencia))
    suite.addTest(test.makeSuite(TesteComodo))
    return suite
예제 #18
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(AuthorGhostTestCase))
    suite.addTest(unittest.makeSuite(EditorGhostTestCase))
    suite.addTest(unittest.makeSuite(ChiefEditorGhostTestCase))
    suite.addTest(unittest.makeSuite(ManagerGhostTestCase))
    return suite
예제 #19
0
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(AnnotationTest))
    suite.addTest(makeSuite(MetadataAnnotationStorageTest))
    suite.addTest(makeSuite(AnnotationStorageTest))
    return suite
def suite():
    return unittest.TestSuite(
        (
            unittest.makeSuite(TemporalInformationRetrieverTestCase),
            unittest.makeSuite(IterationFailerTemporalInformationRetrieverTestCase),
        )
    )
예제 #21
0
def suite():
    return unittest.TestSuite((
        unittest.makeSuite(RFC2396Tests, 'test'),
        unittest.makeSuite(URITests, 'test'),
        unittest.makeSuite(FileURLTests, 'test'),
        unittest.makeSuite(VirtualFileURLTests, 'test')
    ))
예제 #22
0
def suite() -> unittest.TestSuite:
    return unittest.TestSuite([
        unittest.makeSuite(TestEqualsPathRelativity),
        unittest.makeSuite(TestNotEqualsPathRelativity),
        TestEqualsPathRelativityVariants(),
        unittest.makeSuite(TestNotEqualsPathRelativityVariants),
    ])
예제 #23
0
def suite():
    suite = unittest.TestSuite()
    if has_svn:
        tests = [(NormalTests, ''),
                 (ScopedTests, u'/tête'),
                 (RecentPathScopedTests, u'/tête/dir1'),
                 (NonSelfContainedScopedTests, '/tags/v1'),
                 (AnotherNonSelfContainedScopedTests, '/branches'),
                 ]
        skipped = {
            'SvnCachedRepositoryNormalTests': [
                'test_changeset_repos_creation',
                ],
            'SvnCachedRepositoryScopedTests': [
                'test_changeset_repos_creation',
                'test_rev_navigation',
                ],
            }
        for test, scope in tests:
            tc = new.classobj('SubversionRepository' + test.__name__,
                              (SubversionRepositoryTestCase, test),
                              {'path': REPOS_PATH + scope})
            suite.addTest(unittest.makeSuite(
                tc, 'test', suiteClass=SubversionRepositoryTestSetup))
            tc = new.classobj('SvnCachedRepository' + test.__name__,
                              (SvnCachedRepositoryTestCase, test),
                              {'path': REPOS_PATH + scope})
            for skip in skipped.get(tc.__name__, []):
                setattr(tc, skip, lambda self: None) # no skip, so we cheat...
            suite.addTest(unittest.makeSuite(
                tc, 'test', suiteClass=SubversionRepositoryTestSetup))
    else:
        print "SKIP: versioncontrol/tests/svn_fs.py (no svn bindings)"
    return suite
예제 #24
0
def suite():
    return unittest.TestSuite(
        (
            unittest.makeSuite(Case002_Direct_Memory_TestCase),
            unittest.makeSuite(Case002_Direct_MySQL_TestCase)
        )
    )
예제 #25
0
파일: tests.py 프로젝트: astraw/adskalman
def get_test_suite():
    ts=unittest.TestSuite([unittest.makeSuite(TestKalman),
                           unittest.makeSuite(TestAutogeneratedData),
                           #unittest.makeSuite(TestLotsOfAutogeneratedData),
                           unittest.makeSuite(TestStats),
                           ])
    return ts
예제 #26
0
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(DataInputGenericTest))
    suite.addTest(unittest.makeSuite(DataInputAutoKeyTest))
    suite.addTest(unittest.makeSuite(DataInputUseAutoKeyTest))
    # add future test suites here
    return suite
예제 #27
0
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(TestZopeTestCase))
    suite.addTest(makeSuite(TestPlainUserFolder))
    suite.addTest(makeSuite(TestWrappingUserFolder))
    return suite
예제 #28
0
def test_suite():
    from unittest import TestSuite, makeSuite

    suite = TestSuite()
    suite.addTest(makeSuite(TestSSOLogin))
    suite.addTest(makeSuite(TestSSOLoginIframe))
    return suite
예제 #29
0
def suite():
    """ This defines all the tests of a module"""
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(Test_PotentialEvapotranspiration))
    suite.addTest(unittest.makeSuite(Test_WaterLimitedEvapotranspiration1))
    suite.addTest(unittest.makeSuite(Test_WaterLimitedEvapotranspiration2))
    return suite
예제 #30
0
def suite():
    utilsTests.init()

    suites = []
    suites += unittest.makeSuite(SourceToDiaSourceTestCase)
    suites += unittest.makeSuite(utilsTests.MemoryTestCase)
    return unittest.TestSuite(suites)
예제 #31
0
__author__ = '*****@*****.**'
__date__ = '2017-08-21'
__copyright__ = 'Copyright 2017, Kasper Skjeggestad'

import unittest

from PyQt4.QtGui import QIcon


class MasterDialogTest(unittest.TestCase):
    """Test rerources work."""
    def setUp(self):
        """Runs before each test."""
        pass

    def tearDown(self):
        """Runs after each test."""
        pass

    def test_icon_png(self):
        """Test we can click OK."""
        path = ':/plugins/Master/icon.png'
        icon = QIcon(path)
        self.assertFalse(icon.isNull())


if __name__ == "__main__":
    suite = unittest.makeSuite(MasterResourcesTest)
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)
예제 #32
0
def suite():
    return unittest.makeSuite(CoreTestCase, 'test')
예제 #33
0
def suite():
    flow_suite = unittest.makeSuite(MaxFlowTests)
    cut_suite = unittest.makeSuite(CutTests)
    gomory_hu_suite = unittest.makeSuite(GomoryHuTests)
    return unittest.TestSuite([flow_suite, cut_suite, gomory_hu_suite])
def test_suite():
    return unittest.TestSuite((unittest.makeSuite(PropertiedUserTests), ))
예제 #35
0
__author__ = '*****@*****.**'
__date__ = '2017-12-03'
__copyright__ = 'Copyright 2017, Gispo Oy'

import unittest

from PyQt4.QtGui import QIcon


class KuntaGMLtoQGISDialogTest(unittest.TestCase):
    """Test rerources work."""
    def setUp(self):
        """Runs before each test."""
        pass

    def tearDown(self):
        """Runs after each test."""
        pass

    def test_icon_png(self):
        """Test we can click OK."""
        path = ':/plugins/KuntaGMLtoQGIS/icon.png'
        icon = QIcon(path)
        self.assertFalse(icon.isNull())


if __name__ == "__main__":
    suite = unittest.makeSuite(KuntaGMLtoQGISResourcesTest)
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)
예제 #36
0
__author__ = '*****@*****.**'
__date__ = '2018-04-16'
__copyright__ = 'Copyright 2018, Jahangir Alam'

import unittest

from PyQt4.QtGui import QIcon


class SaveLayerInGeoDASHDialogTest(unittest.TestCase):
    """Test rerources work."""
    def setUp(self):
        """Runs before each test."""
        pass

    def tearDown(self):
        """Runs after each test."""
        pass

    def test_icon_png(self):
        """Test we can click OK."""
        path = ':/plugins/SaveLayerInGeoDASH/icon.png'
        icon = QIcon(path)
        self.assertFalse(icon.isNull())


if __name__ == "__main__":
    suite = unittest.makeSuite(SaveLayerInGeoDASHResourcesTest)
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)
예제 #37
0
def get_suite():
    """ Create an instance of the test suite.
    """
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(DevicebusTestCase))
    return suite
예제 #38
0
def test_suite():
    return unittest.TestSuite((
        unittest.makeSuite(Test_exportMailHost),
        unittest.makeSuite(Test_importMailHost),
    ))
예제 #39
0
def suite():
    return unittest.TestSuite((
            unittest.makeSuite(Test_chisquare2way)
                              ))
예제 #40
0
def pysuite():
    suite1 = unittest.makeSuite(TestCase)
    return unittest.TestSuite((suite1, ))
예제 #41
0
def test_suite():
    suite = unittest.TestSuite()
    if has_refs:
        suite.addTest(unittest.makeSuite(ReferenceVCTests))
    return suite
예제 #42
0
try:
    import frameworkBaseTest
    import staticFrameworkTest
    import dynamicFrameworkTest
    import mcFrameworkTest
    import particleFilterFrameworkTest
    import PercentileTests
    import TimeoutputTest
except ImportError as error:
    # leave the print statement here to ensure some useful
    # error message shows up while running ctest
    print(error)
    raise SystemExit(error)

suites = []
suites.append(unittest.makeSuite(PercentileTests.PercentileTests))
suites.append(unittest.makeSuite(frameworkBaseTest.frameworkBaseTestScript))
suites.append(unittest.makeSuite(
    staticFrameworkTest.staticFrameworkTestScript))
suites.append(
    unittest.makeSuite(dynamicFrameworkTest.dynamicFrameworkTestScript))
suites.append(unittest.makeSuite(mcFrameworkTest.mcFrameworkTestScript))
suites.append(
    unittest.makeSuite(
        particleFilterFrameworkTest.ParticleFilterFrameworkTestScript))
suites.append(unittest.makeSuite(TimeoutputTest.TimeoutputTest))
suites = unittest.TestSuite(suites)

result = unittest.TextTestRunner(verbosity=3).run(suites)
test_result = (0 if result.wasSuccessful() else 1)
예제 #43
0
def suite():
    testSuite = unittest.makeSuite(XMLmodelTestCase, "check")
    return testSuite
    """Test dialog works."""

    def setUp(self):
        """Runs before each test."""
        self.dialog = Edit3DiSchematisationDialog(None)

    def tearDown(self):
        """Runs after each test."""
        self.dialog = None

    def test_dialog_ok(self):
        """Test we can click OK."""

        button = self.dialog.button_box.button(QDialogButtonBox.Ok)
        button.click()
        result = self.dialog.result()
        self.assertEqual(result, QDialog.Accepted)

    def test_dialog_cancel(self):
        """Test we can click cancel."""
        button = self.dialog.button_box.button(QDialogButtonBox.Cancel)
        button.click()
        result = self.dialog.result()
        self.assertEqual(result, QDialog.Rejected)


if __name__ == "__main__":
    suite = unittest.makeSuite(Edit3DiSchematisationDialogTest)
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)
예제 #45
0
def suite():
    vertex_suite = unittest.makeSuite(VertexTests)
    vs_suite = unittest.makeSuite(VertexSeqTests)
    return unittest.TestSuite([vertex_suite, vs_suite])
예제 #46
0
            'files',
            'test-importdlg-extractzip.zip')
        extract_zip(zip_file_path, base_file_path)

        message = "file {0} not exist"

        path = '%s.shp' % base_file_path
        assert os.path.exists(path), message.format(path)

        # remove temporary folder and all of its content
        shutil.rmtree(base_path)

    def test_load_shapefile(self):
        """Test loading shape file to QGIS Main Window.

        .. versionadded:: 3.2
        """
        zip_file_path = test_data_path(
            'control', 'files', 'test-importdlg-extractzip.zip')
        output_path = tempfile.mkdtemp()

        extract_zip(zip_file_path, output_path)

        shutil.rmtree(output_path)


if __name__ == '__main__':
    suite = unittest.makeSuite(OsmDownloaderTest, 'test')
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)
예제 #47
0
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(AgreementNoItemsChangeTest))
    suite.addTest(unittest.makeSuite(AgreementChangesResourceTest))
    return suite
예제 #48
0
def suite():
    """Gather all the tests from this module in a test suite."""
    test_suite = unittest.TestSuite()
    test_suite.addTest(unittest.makeSuite(EncodingRedisTest))
    test_suite.addTest(unittest.makeSuite(RedisTest))
    return test_suite
예제 #49
0
def suite():
    suite = unittest.TestSuite()
    suite.addTest(doctest.DocTestSuite(Expression.__module__))
    suite.addTest(unittest.makeSuite(ExpressionTestCase, 'test'))
    suite.addTest(unittest.makeSuite(SuiteTestCase, 'test'))
    return suite
예제 #50
0
    def teste_kldiv_var(self):
        f = eKLdivVar(self.x, self.y, 0)
        g = true_kldiv(self.mux, self.muy, self.sigx, self.sigy)
        self.assertAlmostEqual(
            f, g, 2, 'failed to generate similar answers, f:%f, g:%f' % (f, g))

    def test_random_ekldivvar(self):
        y = self.y + np.random.uniform(-1, 1, 3)
        f = eKLdivVar(self.x, y, 3000000)
        g = true_kldiv(self.mux, y.mus[0], self.sigx, y.sigmas[0])
        self.assertAlmostEqual(
            f, g, 2, 'failed to generate similar answers, f:%f, g:%f' % (f, g))

    def test_ekldivvaru(self):
        f = eKLdivVarU(self.x, self.y)
        g = true_kldiv(self.mux, self.muy, self.sigx, self.sigy)
        self.assertAlmostEqual(
            f, g, 2, 'failed to generate similar answers, f:%f, g:%f' % (f, g))

    def test_random_ekldivvaru(self):
        y = self.y + np.random.uniform(-1, 1, 3)
        f = eKLdivVarU(self.x, y)
        g = true_kldiv(self.mux, y.mus[0], self.sigx, y.sigmas[0])
        self.assertAlmostEqual(
            f, g, 2, 'failed to generate similar answers, f:%f, g:%f' % (f, g))


if __name__ == '__main__':
    suite1 = unittest.makeSuite(KLdivTestCase, 'test')
    unittest.main()
예제 #51
0
def test_suite():
    return unittest.makeSuite(pget_bugTestCase)
예제 #52
0
def test_suite():
    return unittest.TestSuite((unittest.makeSuite(CookieCrumblerTests), ))
예제 #53
0
def test_suite():
    return unittest.TestSuite((unittest.makeSuite(FolderXMLAdapterTests), ))
 def runTests():
     suite = unittest.makeSuite(TestInterestAddRemove)
     unittest.AsyncTextTestRunner(verbosity=2).run(suite)
예제 #55
0
def suite():
    edge_suite = unittest.makeSuite(EdgeTests)
    es_suite = unittest.makeSuite(EdgeSeqTests)
    return unittest.TestSuite([edge_suite, es_suite])
예제 #56
0
        param={"mobile":"15237888353",
                "password":"******",
                "uid":22697}
        head={"Content-Type":"application/x-www-form-urlencoded",
                  "Accepet-Encoding":"gzip,deflate",
                  "Accpet":"*/*",
                   'token':"B26C90E2560916C7D6D49CEBAC1694BC"}
        respones=requests.get(url=url,headers=head ,params=param)
        jieguo=respones.json()
        return jieguo
    def test_1(self):
        html=self.qingqiu()
        self.assertEqual(html["code"],"0")
        self.assertEqual(html["msg"],"请求成功")
    def test_2(self):
        html = self.qingqiu()
        self.assertEqual(html["code"], "0")
        self.assertEqual(html["msg"], "请求成功")
if __name__=="__main__":
    suit=unittest.TestSuite()
    suit.addTest(unittest.makeSuite(gouwuche))
    now=time.strftime('%Y %m %d %H-%M-%S',time.localtime(time.time()))
    f=open("aaa.html","wb")
    runner=HTMLTestRunnertest.HTMLTestRunner(tester="郑博",
                                              description="测试结果如下",
                                             title="购物车查询",
                                             stream=f)
    runner.run(suit)
    f.close()

예제 #57
0
                                msg=msg2)
        ret = get_push_info(self.driver)
        print ret
        assert len(ret) == 2 and msg1 in ret and msg2 in ret
        print u'Step %s:推送多条新闻时测试:OK' % (str(step))
        step += 1

        self.result = True


if __name__ == '__main__':
    pass
    # a = TestLogin()
    # a.setUp()
    # a.testFunc1()
    # a.tearDown()
    #d =DbLib()

    import HTMLTestRunner
    t = unittest.TestSuite()
    t.addTest(unittest.makeSuite(TestComment))
    #unittest.TextTestRunner.run(t)
    filename = 'F:\\dx_comment.html'
    fp = file(filename, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(stream=fp,
                                           title='Dx_Test',
                                           description='Report_discription')

    runner.run(t)
    fp.close()
예제 #58
0
        obs = QuantLib.Observer(raiseFlag)
        obs.registerWith(me)
        me.setValue(3.14)
        if not flag:
            self.fail("Observer was not notified of market element change")

    def testObservableHandle(self):
        "Testing observability of market element handles"
        global flag
        flag = None
        me1 = QuantLib.SimpleQuote(0.0)
        h = QuantLib.RelinkableQuoteHandle(me1)
        obs = QuantLib.Observer(raiseFlag)
        obs.registerWith(h)
        me1.setValue(3.14)
        if not flag:
            self.fail("Observer was not notified of market element change")
        flag = None
        me2 = QuantLib.SimpleQuote(0.0)
        h.linkTo(me2)
        if not flag:
            self.fail("Observer was not notified of market element change")


if __name__ == '__main__':
    print 'testing QuantLib', QuantLib.__version__
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(MarketElementTest, 'test'))
    unittest.TextTestRunner(verbosity=2).run(suite)
    raw_input('press return to continue')
예제 #59
0
class OrthoMakerDialogTest(unittest.TestCase):
    """Test dialog works."""
    def setUp(self):
        """Runs before each test."""
        self.dialog = OrthoMakerDialog(None)

    def tearDown(self):
        """Runs after each test."""
        self.dialog = None

    def test_dialog_ok(self):
        """Test we can click OK."""

        button = self.dialog.button_box.button(QDialogButtonBox.Ok)
        button.click()
        result = self.dialog.result()
        self.assertEqual(result, QDialog.Accepted)

    def test_dialog_cancel(self):
        """Test we can click cancel."""
        button = self.dialog.button_box.button(QDialogButtonBox.Cancel)
        button.click()
        result = self.dialog.result()
        self.assertEqual(result, QDialog.Rejected)


if __name__ == "__main__":
    suite = unittest.makeSuite(OrthoMakerDialogTest)
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)
예제 #60
0
                eq(b_arr.f2._ag.dout, _f2_out, (i, i2))

                emp(b_arr.f2._ag.din, (i, i2))
                dinEq(a_arr.f2, _f2_in, (i, i2))

    def test_ListOfInterfacesSample4b(self):
        u = ListOfInterfacesSample4b()
        self._test(u)

    def test_ListOfInterfacesSample4c(self):
        u = ListOfInterfacesSample4c()
        self._test(u)

    def test_ListOfInterfacesSample4d(self):
        u = ListOfInterfacesSample4d()
        self._test(u)


if __name__ == "__main__":
    import unittest
    suite = unittest.TestSuite()
    # suite.addTest(ListOfInterfacesSample4TC('test_ListOfInterfacesSample4b_intfIterations'))
    # suite.addTest(ListOfInterfacesSample4TC('test_ListOfInterfacesSample4b'))

    suite.addTest(unittest.makeSuite(ListOfInterfacesSample4TC))
    runner = unittest.TextTestRunner(verbosity=3)
    runner.run(suite)

    from hwt.synthesizer.utils import toRtl
    print(toRtl(ListOfInterfacesSample4c()))