コード例 #1
0
    def test_snap(self):
        branch = "collection.precise"
        self.addSeed(branch, "base")
        self.addSeedSnap(branch, "base", "hello")
        germinator = Germinator("i386")
        structure = self.openSeedStructure(branch)
        germinator.plant_seeds(structure)
        germinator.grow(structure)

        self.assertEqual(set(["hello"]),
                         germinator.get_snaps(structure, "base"))
コード例 #2
0
    def test_snap_recommends(self):
        branch = "collection.precise"
        self.addSeed(branch, "base")
        self.addSeedSnap(branch, "base", "(hello)")
        with self.assertLogs("germinate", level=logging.WARNING) as logs:
            germinator = Germinator("i386")
            structure = self.openSeedStructure(branch)
            germinator.plant_seeds(structure)
            germinator.grow(structure)
        self.assertIn('ignoring hello', logs.output[0])

        self.assertEqual(set([]), germinator.get_snaps(structure, "base"))
コード例 #3
0
ファイル: test_germinator.py プロジェクト: Lyoncore/germinate
    def test_snap(self):
        import logging
        from germinate.log import germinate_logging
        germinate_logging(logging.INFO)
        branch = "collection.precise"
        self.addSeed(branch, "base")
        self.addSeedSnap(branch, "base", "hello")
        germinator = Germinator("i386")
        structure = self.openSeedStructure(branch)
        germinator.plant_seeds(structure)
        germinator.grow(structure)

        self.assertEqual(set(["hello"]),
                         germinator.get_snaps(structure, "base"))