if 'TOOLKIT' == test.test_ctxtype: assertToolkitRoot(test, test.result) else: test.assertNotIn('toolkitRoot', test.result) if 'BUNDLE' == test.test_ctxtype: assertBundlePath(test, test.result) test.assertNotIn('archivePath', test.result) elif 'BUILD_ARCHIVE' == test.test_ctxtype: assertArchivePath(test, test.result) test.assertNotIn('bundlePath', test.result) else: test.assertNotIn('bundlePath', test.result) test.assertNotIn('archivePath', test.result) @unittest.skipIf(not test_vers.tester_supported(), "Tester not supported") class TestToolkitMethodsNew(unittest.TestCase): def setUp(self): self.topo = Topology('test_ToolkitSource') self.topo.source(['Hello', 'Toolkit']) self.test_ctxtype = 'TOOLKIT' self.test_config = {} self.result = {} def tearDown(self): removeArtifacts(self.result) def test_NoKeepArtifacts(self): self.result = streamsx.topology.context.submit(self.test_ctxtype, self.topo, self.test_config)
# coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2017 import unittest import sys import itertools from streamsx.topology.topology import * from streamsx.topology.tester import Tester import streamsx.topology.context as stc import test_vers @unittest.skipIf(not test_vers.tester_supported() , "Tester not supported") class TestNames(unittest.TestCase): def setUp(self): Tester.setup_standalone(self) def test_NotebookDefaultNames(self): """ Test default topo names from a notebook """ topo = Topology(name='<module>', namespace='<ipython-input-1-e300f4c6abce>') hw = topo.source(["Hello", "Tester"]) s = hw.filter(lambda x : True, name = "One.A") s = s.filter(lambda x : True, name = "Two.A") tester = Tester(topo) tester.contents(s, ["Hello", "Tester"]) tester.test(self.test_ctxtype, self.test_config) def test_UnicodeTopoNames(self):