def test_builder_8(self):
     c = Forbid(self.prop2) & Forbid(self.prop1)
     self.assertEqual('[[-2], [-1]]', str(c.cnf()))
     self.assertDictEqual({
         1: url_by_name('BAR'),
         2: url_by_name('FOO')
     }, c.props)
 def test_builder_22(self):
     c = Forbid(self.prop3) & Require(self.prop2)
     self.assertEqual('[[-1], [2]]', str(c.cnf()))
     self.assertDictEqual({
         1: url_by_name('BAZ'),
         2: url_by_name('BAR')
     }, c.props)
 def test_builder_18(self):
     c = Require(self.prop3) & Forbid(self.prop2) & Forbid(self.prop1)
     self.assertEqual('[[-3], [-2], [1]]', str(c.cnf()))
     self.assertDictEqual(
         {
             1: url_by_name('BAZ'),
             2: url_by_name('BAR'),
             3: url_by_name('FOO')
         }, c.props)
 def test_builder_6(self):
     c = Forbid(self.prop2)
     self.assertEqual('[[-1]]', str(c.cnf()))
     self.assertDictEqual({1: url_by_name('BAR')}, c.props)
Exemplo n.º 5
0
 def requirements(self) -> ConjunctionBuilder:
     return Any(
         Forbid(url_by_name('BAZ')) | Require(url_by_name('BAR'))
         | Forbid(url_by_name('BAM'))) & Require(
             url_by_name('FOO')) & Forbid(url_by_name('CAT'))
Exemplo n.º 6
0
 def requirements(self) -> ConjunctionBuilder:
     return Forbid(url_by_name('BAZ')) & Forbid(url_by_name('BAM'))
Exemplo n.º 7
0
 def requirements(self) -> ConjunctionBuilder:
     return Forbid(url_by_name('FOO')) & Forbid('foo')
Exemplo n.º 8
0
 def requirements(self):
     return Require(
         self.source1) & Any(Require(self.source2)
                             | Require(self.source3)) & Forbid(
                                 self.forbidden)