コード例 #1
0
ファイル: test_powerup.py プロジェクト: perkinslr/axiom-py3
 def test_automaticPowerDown(self):
     """
     Powerups with 'powerupInterfaces' attributes can be powered
     down automatically on the interfaces they specify.
     """
     s = Store()
     p = PlusTwo(store=s)
     s.powerUp(p)
     s.powerDown(p)
     self.assertEqual(len(list(s.powerupsFor(IValueHaver))), 0)
コード例 #2
0
ファイル: test_powerup.py プロジェクト: bne/squeal
 def test_automaticPowerDown(self):
     """
     Powerups with 'powerupInterfaces' attributes can be powered
     down automatically on the interfaces they specify.
     """
     s = Store()
     p = PlusTwo(store=s)
     s.powerUp(p)
     s.powerDown(p)
     self.assertEquals(len(list(s.powerupsFor(IValueHaver))), 0)
コード例 #3
0
ファイル: test_powerup.py プロジェクト: perkinslr/axiom-py3
 def test_automaticDynamicPowerDown(self):
     """
     Powerups with '__getPowerupInterfaces__' methods can be powered
     down automatically on the interfaces they specify.
     """
     s = Store()
     p = PlusOneTimesFour(store=s)
     s.powerUp(p)
     s.powerDown(p)
     self.assertEqual(len(list(s.powerupsFor(IValueHaver))), 0)
     self.assertEqual(len(list(s.powerupsFor(IScalingFactor))), 0)
コード例 #4
0
ファイル: test_powerup.py プロジェクト: bne/squeal
 def test_automaticDynamicPowerDown(self):
     """
     Powerups with '__getPowerupInterfaces__' methods can be powered
     down automatically on the interfaces they specify.
     """
     s = Store()
     p = PlusOneTimesFour(store=s)
     s.powerUp(p)
     s.powerDown(p)
     self.assertEquals(len(list(s.powerupsFor(IValueHaver))), 0)
     self.assertEquals(len(list(s.powerupsFor(IScalingFactor))), 0)