• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python support.installed_but函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: test_distro_sync_all

 def test_distro_sync_all(self):
     self.base.distro_sync()
     self.assertIn(rpm.RPMPROB_FILTER_OLDPACKAGE, self.base._rpm_probfilter)
     packages = support.installed_but(self.sack, "pepper", "librita").run()
     q = self.sack.query().available().filter(name=["pepper", "librita"])
     packages.extend(q)
     self.assertResult(self.base, packages)
开发者ID:gbraad,项目名称:dnf,代码行数:7,代码来源:test_distsync.py


示例2: test_reinstall

 def test_reinstall(self):
     cnt = self.base.reinstall('pepper')
     self.assertEqual(cnt, 1)
     new_set = support.installed_but(self.sack, "pepper")
     available_query = self.sack.query().available()
     new_set += list(available_query._nevra("pepper-20-0.x86_64"))
     self.assertResult(self.base, new_set)
开发者ID:dmach,项目名称:dnf,代码行数:7,代码来源:test_reinstall.py


示例3: test_distro_sync

 def test_distro_sync(self):
     self.yumbase.distro_sync()
     self.assertIn(rpm.RPMPROB_FILTER_OLDPACKAGE, self.yumbase.rpm_probfilter)
     packages = support.installed_but(self.sack, "pepper", "librita").run()
     packages.extend(available_by_name(self.sack, ["pepper", "librita"]))
     packages.extend(installed_by_nevra(self.sack, "librita-1-1.i686"))
     self.assertResult(self.yumbase, packages)
开发者ID:PaulReiber,项目名称:dnf,代码行数:7,代码来源:test_distsync.py


示例4: test_reinstall

 def test_reinstall(self):
     cnt = self.yumbase.reinstall("pepper")
     self.assertEqual(cnt, 1)
     new_set = support.installed_but(self.sack, "pepper")
     new_pkg = dnf.queries.available_by_nevra(self.sack, "pepper-20-0.x86_64")
     new_set += list(new_pkg)
     self.assertResult(self.yumbase, new_set)
开发者ID:lmacken,项目名称:dnf,代码行数:7,代码来源:test_reinstall.py


示例5: test_upgrade_to

 def test_upgrade_to(self):
     yumbase = support.MockYumBase("main", "updates")
     sack = yumbase.sack
     yumbase.upgrade_to("pepper-20-1.x86_64")
     new_set = support.installed_but(sack, "pepper").run()
     new_set.extend(dnf.queries.available_by_nevra(sack, "pepper-20-1.x86_64"))
     self.assertResult(yumbase, new_set)
开发者ID:PaulReiber,项目名称:dnf,代码行数:7,代码来源:test_upgrade_to.py


示例6: test_upgrade_to_package

 def test_upgrade_to_package(self):
     base = support.MockBase()
     pkg = base.add_remote_rpm(support.TOUR_51_PKG_PATH)
     cnt = base.package_upgrade(pkg)
     self.assertEqual(cnt, 1)
     new_pkg = base.sack.query().available().filter(name="tour")[0]
     new_set = support.installed_but(base.sack, "tour") + [new_pkg]
     self.assertResult(base, new_set)
开发者ID:IMFTC,项目名称:dnf,代码行数:8,代码来源:test_update.py


示例7: test_upgrade_all

 def test_upgrade_all(self):
     """ upgrade() without parameters upgrade everything it can that has its
         deps in trim. Broken packages are silently skipped.
     """
     self.base.upgrade_all()
     new_set = support.installed_but(self.sack, "pepper").run()
     new_set.extend(self.sack.query().available().nevra("pepper-20-1.x86_64"))
     self.assertResult(self.base, new_set)
开发者ID:IMFTC,项目名称:dnf,代码行数:8,代码来源:test_update.py


示例8: test_upgrade_to

 def test_upgrade_to(self):
     base = support.MockBase("main", "updates")
     sack = base.sack
     base.upgrade_to("pepper-20-1.x86_64")
     new_set = support.installed_but(sack, "pepper").run()
     q = sack.query().available()._nevra("pepper-20-1.x86_64")
     new_set.extend(q)
     self.assertResult(base, new_set)
开发者ID:anjali-92,项目名称:dnf,代码行数:8,代码来源:test_upgrade_to.py


示例9: test_update_local

 def test_update_local(self):
     yumbase = support.MockYumBase()
     sack = yumbase.sack
     cnt = yumbase.update_local(support.TOUR_51_PKG_PATH)
     self.assertEqual(cnt, 1)
     new_pkg = available_by_name(sack, "tour")[0]
     new_set = support.installed_but(yumbase.sack, "tour") + [new_pkg]
     self.assertResult(yumbase, new_set)
开发者ID:PaulReiber,项目名称:dnf,代码行数:8,代码来源:test_update.py


示例10: test_update_local

 def test_update_local(self):
     yumbase = support.MockBase()
     sack = yumbase.sack
     cnt = yumbase.update_local(support.TOUR_51_PKG_PATH)
     self.assertEqual(cnt, 1)
     new_pkg = sack.query().available().filter(name="tour")[0]
     new_set = support.installed_but(yumbase.sack, "tour") + [new_pkg]
     self.assertResult(yumbase, new_set)
开发者ID:zde,项目名称:dnf,代码行数:8,代码来源:test_update.py


示例11: test_update_all

 def test_update_all(self):
     """ Update all you can. """
     base = support.MockBase("main", "updates")
     sack = base.sack
     base.upgrade_all()
     expected = support.installed_but(sack, "pepper", "hole", "tour") + \
         list(sack.query().available().nevra("pepper-20-1.x86_64")) + \
         list(sack.query().available().nevra("hole-2-1.x86_64"))
     self.assertResult(base, expected)
开发者ID:IMFTC,项目名称:dnf,代码行数:9,代码来源:test_update.py


示例12: test_update_all

 def test_update_all(self):
     """ Update all you can. """
     yumbase = support.MockYumBase("main", "updates")
     sack = yumbase.sack
     yumbase.update()
     expected = support.installed_but(sack, "pepper", "hole") + \
         list(available_by_nevra(sack, "pepper-20-1.x86_64")) + \
         list(available_by_nevra(sack, "hole-2-1.x86_64"))
     self.assertResult(yumbase, expected)
开发者ID:PaulReiber,项目名称:dnf,代码行数:9,代码来源:test_update.py


示例13: test_downgrade

    def test_downgrade(self):
        base = support.MockBase("main")
        sack = base.sack
        cnt = base.downgrade("tour")
        self.assertGreater(cnt, 0)

        new_pkg = sack.query().available().filter(name="tour")[0]
        self.assertEqual(new_pkg.evr, "4.6-1")
        new_set = support.installed_but(sack, "tour") + [new_pkg]
        self.assertResult(base, new_set)
开发者ID:edynox,项目名称:dnf,代码行数:10,代码来源:test_downgrade.py


示例14: test_downgrade

    def test_downgrade(self):
        yumbase = support.MockYumBase("main")
        sack = yumbase.sack
        cnt = yumbase.downgrade("tour")
        self.assertGreater(cnt, 0)

        new_pkg = dnf.queries.available_by_name(sack, "tour")[0]
        self.assertEqual(new_pkg.evr, "4.6-1")
        new_set = support.installed_but(sack, "tour") + [new_pkg]
        self.assertResult(yumbase, new_set)
开发者ID:PaulReiber,项目名称:dnf,代码行数:10,代码来源:test_downgrade.py


示例15: test_remove_dependent

 def test_remove_dependent(self):
     """ Remove a lib that some other package depends on. """
     ret = self.base.remove("librita")
     # we should end up with nothing in this case:
     new_set = support.installed_but(self.base.sack, "librita", "pepper")
     self.assertResult(self.base, new_set)
开发者ID:edynox,项目名称:dnf,代码行数:6,代码来源:test_remove.py


示例16: test_remove

 def test_remove(self):
     """ Simple remove. """
     ret = self.base.remove("pepper")
     self.assertResult(self.base,
                       support.installed_but(self.base.sack, "pepper"))
开发者ID:edynox,项目名称:dnf,代码行数:5,代码来源:test_remove.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python support.mock_sack函数代码示例发布时间:2022-05-27
下一篇:
Python support.dnf_toplevel函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap