当前位置: 首页>>代码示例>>Python>>正文


Python basetest.BaseTest类代码示例

本文整理汇总了Python中basetest.BaseTest的典型用法代码示例。如果您正苦于以下问题:Python BaseTest类的具体用法?Python BaseTest怎么用?Python BaseTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BaseTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: tearDown

	def tearDown(self):
		helpers.get_selections_gui = real_get_selections_gui
		BaseTest.tearDown(self)
		kill_server_process()

		# Flush out ResourceWarnings
		import gc; gc.collect()
开发者ID:gvsurenderreddy,项目名称:0install,代码行数:7,代码来源:testdownload.py

示例2: setUp

	def setUp(self):
		BaseTest.setUp(self)
		stream = tempfile.TemporaryFile(mode = 'w+b')
		stream.write(data.thomas_key)
		stream.seek(0)
		gpg.import_key(stream)
		stream.close()
开发者ID:dabrahams,项目名称:0install,代码行数:7,代码来源:testdriver.py

示例3: tearDown

	def tearDown(self):
		BaseTest.tearDown(self)

		support.ro_rmtree(self.store_parent)
		support.ro_rmtree(self.tmp)

		cli.stores = None
开发者ID:AlexanderRyzhko,项目名称:0install-TUF,代码行数:7,代码来源:teststore.py

示例4: setUp

	def setUp(self):
		BaseTest.setUp(self)

		self.config.handler.allow_downloads = True
		self.config.key_info_server = 'http://localhost:3333/key-info'
		self.config.fetcher = fetch.Fetcher(self.config)

		child_config = config.Config()
		child_config.key_info_server = 'http://localhost:3333/key-info'
		child_config.save_globals()

		stream = tempfile.TemporaryFile()
		stream.write(data.thomas_key)
		stream.seek(0)
		gpg.import_key(stream)
		stream.close()

		trust.trust_db.watchers = []

		helpers.get_selections_gui = raise_gui

		global ran_gui
		ran_gui = False

		global traced_downloads
		traced_downloads = []
开发者ID:rammstein,项目名称:0install,代码行数:26,代码来源:testdownload.py

示例5: setUp

    def setUp(self):
        BaseTest.setUp(self)

        with tempfile.TemporaryFile(mode="w+b") as stream:
            stream.write(thomas_key)
            stream.seek(0)
            gpg.import_key(stream)
            warnings.filterwarnings("ignore", category=DeprecationWarning)
开发者ID:pombredanne,项目名称:0install,代码行数:8,代码来源:testgpg.py

示例6: setUp

	def setUp(self):
		BaseTest.setUp(self)

		stream = tempfile.TemporaryFile()
		stream.write(thomas_key)
		stream.seek(0)
		gpg.import_key(stream)
		trust.trust_db.trust_key(THOMAS_FINGERPRINT)
		warnings.filterwarnings("ignore", category = DeprecationWarning)
开发者ID:pombredanne,项目名称:zero-install,代码行数:9,代码来源:testgpg.py

示例7: setUp

	def setUp(self):
		BaseTest.setUp(self)

		self.store_parent = tempfile.mktemp()
		os.mkdir(self.store_parent, 0o700)
		self.store = Store(self.store_parent + '/implementations')
		os.mkdir(self.store.dir, 0o700)

		self.tmp = tempfile.mktemp()
		os.mkdir(self.tmp)
开发者ID:AlexanderRyzhko,项目名称:0install-TUF,代码行数:10,代码来源:teststore.py

示例8: setUp

    def setUp(self):
        BaseTest.setUp(self)

        self.server = Server(host=self.host,
                       project=self.project,
                       username=self.user,
                       password=self.password,
                       port=self.port)
        self.org_api = Organization()
        self.env_api = Environment()

        self.start_time = time.time()
开发者ID:vittyvk,项目名称:mangonel,代码行数:12,代码来源:test_Organizations.py

示例9: tearDown

	def tearDown(self):
		# Wait for all downloads to finish, otherwise they may interfere with other tests
		for dl in list(self.config.handler.monitored_downloads):
			try:
				tasks.wait_for_blocker(dl.downloaded)
			except:
				pass

		BaseTest.tearDown(self)
		kill_server_process()

		# Flush out ResourceWarnings
		import gc; gc.collect()
开发者ID:linuxmidhun,项目名称:0install,代码行数:13,代码来源:testdownload.py

示例10: setUp

    def setUp(self):
        BaseTest.setUp(self)

        self.config.handler.allow_downloads = True
        self.config.fetcher = fetch.Fetcher(self.config.handler)

        stream = tempfile.TemporaryFile()
        stream.write(data.thomas_key)
        stream.seek(0)
        gpg.import_key(stream)
        self.child = None

        trust.trust_db.watchers = []
开发者ID:pombredanne,项目名称:zero-install,代码行数:13,代码来源:testdownload.py

示例11: setUp

	def setUp(self):
		BaseTest.setUp(self)

		self.config.handler.allow_downloads = True
		self.config.key_info_server = 'http://localhost:3333/key-info'

		self.config.fetcher = fetch.Fetcher(self.config)

		stream = tempfile.TemporaryFile()
		stream.write(data.thomas_key)
		stream.seek(0)
		gpg.import_key(stream)
		stream.close()

		trust.trust_db.watchers = []
开发者ID:dabrahams,项目名称:zeroinstall,代码行数:15,代码来源:testdownload.py

示例12: setUp

    def setUp(self):
        BaseTest.setUp(self)

        self.server = Server(host=self.host,
                       project=self.project,
                       username=self.user,
                       password=self.password)
        self.org_api = Organization()
        self.ak_api = ActivationKey()
        self.env_api = Environment()
        self.prd_api = Product()
        self.prv_api = Provider()
        self.repo_api = Repository()
        self.sys_api = System()

        self.start_time = time.time()
开发者ID:vittyvk,项目名称:mangonel,代码行数:16,代码来源:test_ActivationKeys.py

示例13: setUp

    def setUp(self):
        BaseTest.setUp(self)

        self.server = Server(host=self.host,
                       project=self.project,
                       username=self.user,
                       password=self.password,
                       port=self.port)
        self.org_api = Organization()
        self.env_api = Environment()
        self.sys_api = System()

        # Include the main options here so test suites may add their own
        parser = argparse.ArgumentParser()
        parser.add_argument('-dorg', '--org-label', type=str, dest='org_label')
        [self.args, ignored_args] = parser.parse_known_args()

        self.start_time = time.time()
开发者ID:sthirugn,项目名称:mangonel,代码行数:18,代码来源:test_HealAll.py

示例14: setUp

    def setUp(self):
        BaseTest.setUp(self)

        self.server = Server(host=self.host,
                       project=self.project,
                       username=self.user,
                       password=self.password,
                       port=self.port)
        self.org_api = Organization()
        self.chs_api = Changeset()
        self.cv_api = ContentView()
        self.cvd_api = ContentViewDefinition()
        self.env_api = Environment()
        self.prd_api = Product()
        self.prv_api = Provider()
        self.repo_api = Repository()
        self.sys_api = System()

        self.start_time = time.time()
开发者ID:vittyvk,项目名称:mangonel,代码行数:19,代码来源:test_Stress.py

示例15: setUp

    def setUp(self):
        BaseTest.setUp(self)

        self.server = Server(host=self.host,
                       project=self.project,
                       username=self.user,
                       password=self.password,
                       port=self.port)
        self.org_api = Organization()
        self.env_api = Environment()
        self.sys_api = System()
        self.csvload = CSVLoad(self.sys_api, self.org_api, self.env_api)

        # Include the main options here so test suites may add their own
        parser = argparse.ArgumentParser()
        parser.add_argument('-dorg', '--org-csv', type=str, dest='org_csv')
        parser.add_argument('-dsys', '--sys-csv', type=str, dest='sys_csv')
        parser.add_argument('--no-cleanup', dest='nocleanup' ,action='store_true', help="Do not remove testing org")
        parser.set_defaults(nocleanup=False)
        [self.args, ignored_args] = parser.parse_known_args()

        self.start_time = time.time()
开发者ID:vittyvk,项目名称:mangonel,代码行数:22,代码来源:test_Populate.py


注:本文中的basetest.BaseTest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。