def test_builder_12(self): c = Require(self.prop3) & Forbid(self.prop1) self.assertEqual('[[-2], [1]]', str(c.cnf())) self.assertDictEqual({ 1: url_by_name('BAZ'), 2: url_by_name('FOO') }, c.props)
def test_builder_13(self): c = Require(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_23(self): c = Forbid(self.prop3) & Require(self.prop2) & Require(self.prop1) self.assertEqual('[[-1], [2], [3]]', 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_2(self): c = Any( Require(self.prop1) | Require(self.prop2) | Require(self.prop3)) self.assertEqual('[[1, 2, 3]]', str(c.cnf())) self.assertDictEqual( { 1: url_by_name('FOO'), 2: url_by_name('BAR'), 3: url_by_name('BAZ') }, c.props)
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'))
def test_builder_1(self): c = Require(self.prop1) self.assertEqual('[[1]]', str(c.cnf())) self.assertDictEqual({1: url_by_name('FOO')}, c.props)
def requirements(self): return Require( bind_mount_by_name( 'DATA_DIRECTORY_LOCATION', mount_type=MountType.DIRECTORY, description='The location for the data files of use case X'))
def requirements(self) -> ConjunctionBuilder: return Require(url_by_name('FOO')) & Require(url_by_name('BAR'))
def requirements(self): return Require(bind_mount_by_name('FOO', MountType.DIRECTORY))
def requirements(self): return Require(bind_mount_by_name('FOO', MountType.FILE))
def requirements(self): return Require(enum_by_name('FOO', choices=['VALUE1', 'VALUE2']))
def requirements(self) -> ConjunctionBuilder: return Any(Require(url_by_name('FOO')))
def requirements(self): return Require( self.source1) & Any(Require(self.source2) | Require(self.source3)) & Forbid( self.forbidden)