Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def testRemoveAttributesWithoutSettings(self):
dobj = PBXBuildFile.create(PBXGenericObject())
dobj.remove_attributes('Weak')
self.assertIsNone(dobj[u'settings'])
def testRemoveAttributesWithSettings(self):
dobj = PBXBuildFile.create(PBXGenericObject(), attributes=["Weak"])
dobj.remove_attributes('Weak')
self.assertIsNone(dobj[u'settings'])
def testAddAttributesWithAttributes(self):
dobj = PBXBuildFile.create(PBXGenericObject(), attributes="x")
dobj.add_attributes(u'Weak')
self.assertIsNotNone(dobj.settings.ATTRIBUTES)
self.assertEquals(dobj.settings.ATTRIBUTES, [u'x', u'Weak'])
def testAddAttributesWithoutAttributes(self):
dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags="x")
dobj.add_attributes(u'Weak')
self.assertIsNotNone(dobj.settings.ATTRIBUTES)
self.assertEquals(dobj.settings.ATTRIBUTES, [u'Weak'])
def testAddAttributesWithoutSettings(self):
dobj = PBXBuildFile.create(PBXGenericObject())
dobj.add_attributes(u'Weak')
self.assertIsNotNone(dobj.settings.ATTRIBUTES)
self.assertEquals(dobj.settings.ATTRIBUTES, [u'Weak'])
def testAddCompilerFlagWithFlags(self):
dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=[u'Weak', '-fno-arc'])
dobj.add_compiler_flags('x')
self.assertIsNotNone(dobj.settings.COMPILER_FLAGS)
self.assertEquals(dobj.settings.COMPILER_FLAGS, u'Weak -fno-arc x')
def testRemoveCompilerFlagsWithSettings(self):
dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=u'Weak')
dobj.remove_compiler_flags('Weak')
self.assertIsNone(dobj[u'settings'])
def testAddCompilerFlagWithoutSettings(self):
dobj = PBXBuildFile.create(PBXGenericObject())
dobj.add_compiler_flags([u'Weak', '-fno-arc'])
self.assertIsNotNone(dobj.settings.COMPILER_FLAGS)
self.assertEquals(dobj.settings.COMPILER_FLAGS, u'Weak -fno-arc')
def testRemoveCompilerFlagsWithoutSettings(self):
dobj = PBXBuildFile.create(PBXGenericObject())
dobj.remove_compiler_flags('Weak')
self.assertIsNone(dobj[u'settings'])