Best Python code snippet using autotest_python
utils_koji.py
Source: utils_koji.py
...252 tag = self.session.getTag(pkg.tag)253 if tag:254 return True255 return False256 def get_pkg_rpm_info(self, pkg, arch=None):257 '''258 Returns a list of infomation on the RPM packages found on koji259 @type pkg: KojiPkgSpec260 @param pkg: a package specification261 @type arch: string262 @param arch: packages built for this architecture, but also including263 architecture independent (noarch) packages264 '''265 if arch is None:266 arch = utils.get_arch()267 rpms = []268 info = self.get_pkg_info(pkg)269 if info:270 rpms = self.session.listRPMs(buildID=info['id'],271 arches=[arch, 'noarch'])272 if pkg.subpackages:273 rpms = [d for d in rpms if d['name'] in pkg.subpackages]274 return rpms275 def get_pkg_rpm_names(self, pkg, arch=None):276 '''277 Gets the names for the RPM packages specified in pkg278 @type pkg: KojiPkgSpec279 @param pkg: a package specification280 @type arch: string281 @param arch: packages built for this architecture, but also including282 architecture independent (noarch) packages283 '''284 if arch is None:285 arch = utils.get_arch()286 rpms = self.get_pkg_rpm_info(pkg, arch)287 return [rpm['name'] for rpm in rpms]288 def get_pkg_rpm_file_names(self, pkg, arch=None):289 '''290 Gets the file names for the RPM packages specified in pkg291 @type pkg: KojiPkgSpec292 @param pkg: a package specification293 @type arch: string294 @param arch: packages built for this architecture, but also including295 architecture independent (noarch) packages296 '''297 if arch is None:298 arch = utils.get_arch()299 rpm_names = []300 rpms = self.get_pkg_rpm_info(pkg, arch)301 for rpm in rpms:302 arch_rpm_name = koji.pathinfo.rpm(rpm)303 rpm_name = os.path.basename(arch_rpm_name)304 rpm_names.append(rpm_name)305 return rpm_names306 def get_pkg_base_url(self):307 '''308 Gets the base url for packages in Koji309 '''310 if self.config_options.has_key('pkgurl'):311 return self.config_options['pkgurl']312 else:313 return "%s/%s" % (self.config_options['topurl'],314 'packages')315 def get_scratch_base_url(self):316 '''317 Gets the base url for scratch builds in Koji318 '''319 one_level_up = os.path.dirname(self.get_pkg_base_url())320 return "%s/%s" % (one_level_up, 'scratch')321 def get_pkg_urls(self, pkg, arch=None):322 '''323 Gets the urls for the packages specified in pkg324 @type pkg: KojiPkgSpec325 @param pkg: a package specification326 @type arch: string327 @param arch: packages built for this architecture, but also including328 architecture independent (noarch) packages329 '''330 info = self.get_pkg_info(pkg)331 rpms = self.get_pkg_rpm_info(pkg, arch)332 rpm_urls = []333 base_url = self.get_pkg_base_url()334 for rpm in rpms:335 rpm_name = koji.pathinfo.rpm(rpm)336 url = ("%s/%s/%s/%s/%s" % (base_url,337 info['package_name'],338 info['version'], info['release'],339 rpm_name))340 rpm_urls.append(url)341 return rpm_urls342 def get_pkgs(self, pkg, dst_dir, arch=None):343 '''344 Download the packages345 @type pkg: KojiPkgSpec...
Check out the latest blogs from LambdaTest on this topic:
Before we discuss Scala testing, let us understand the fundamentals of Scala and how this programming language is a preferred choice for your development requirements.The popularity and usage of Scala are rapidly rising, evident by the ever-increasing open positions for Scala developers.
So, now that the first installment of this two fold article has been published (hence you might have an idea of what Agile Testing is not in my opinion), I’ve started feeling the pressure to explain what Agile Testing actually means to me.
Did you know that according to Statista, the number of smartphone users will reach 18.22 billion by 2025? Let’s face it, digital transformation is skyrocketing and will continue to do so. This swamps the mobile app development market with various options and gives rise to the need for the best mobile app testing tools
As a developer, checking the cross browser compatibility of your CSS properties is of utmost importance when building your website. I have often found myself excited to use a CSS feature only to discover that it’s still not supported on all browsers. Even if it is supported, the feature might be experimental and not work consistently across all browsers. Ask any front-end developer about using a CSS feature whose support is still in the experimental phase in most prominent web browsers. ????
The count of mobile users is on a steep rise. According to the research, by 2025, it is expected to reach 7.49 billion users worldwide. 70% of all US digital media time comes from mobile apps, and to your surprise, the average smartphone owner uses ten apps per day and 30 apps each month.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!