def __init__(self, filename, source_directory): Require.__init__( self, string='.'.join(source_directory+[filename]), found_in=[], urgency=Require.URGENCY_ERROR) pass
def set_marshalling_data(self, data): version = data[Marshallable.VERSIONS]['Require_CInclude'] if version != 1: raise MarshalledVersionUnknownError(klass=self.__class__, marshalled_version=version, current_version=1) Require.set_marshalling_data(self, data) pass
def test(self): d1 = DependencyInformation() d2 = DependencyInformation() self.failUnless(d1.is_equal(d2)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d1.add_provide(Provide('b')) d2 = DependencyInformation() d2.add_provide(Provide('a')) d2.add_provide(Provide('b')) self.failUnless(d1.is_equal(d2)) self.failUnless(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d2 = DependencyInformation() self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d2 = DependencyInformation() d2.add_provide(Provide('b')) self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d2 = DependencyInformation() d2.add_provide(Provide('a', Provide.GLOB_MATCH)) self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a', Provide.GLOB_MATCH)) d2 = DependencyInformation() d2.add_provide(Provide('a', Provide.GLOB_MATCH)) self.failUnless(d1.is_equal(d2)) self.failUnless(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d1.add_require(Require(string='a', found_in=[])) d2 = DependencyInformation() d2.add_provide(Provide('a')) self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) pass
def __init__(self, filename, found_in, urgency=Require.URGENCY_DEFAULT): fn = helper.normalize_filename(filename) Require.__init__(self, string=fn, found_in=found_in, urgency=urgency) pass
def get_marshalling_data(self): return update_marshalling_data( marshalling_data=Require.get_marshalling_data(self), generating_class=Require_CInclude, attributes={}, version={'Require_CInclude': 1})
def __init__(self, filename, found_in, urgency): Require.__init__(self, string=helper.normalize_filename(filename), found_in=found_in, urgency=urgency) pass
def get_marshalling_data(self): return update_marshalling_data( marshalling_data=Require.get_marshalling_data(self), generating_class=RequireRelocatedHeader, attributes={}, version={'RequireRelocatedHeader': 1})