def test_StackDepend(self): from roslib.manifestlib import Depend, StackDepend, ManifestException for bad in [None, '']: try: StackDepend(bad) self.fail("should have failed on [%s]"%bad) except ValueError: pass d = StackDepend('common') self.assertEquals('common', str(d)) self.assertEquals('common', repr(d)) self.assertEquals('<depend stack="common" />',d.xml()) self.assertEquals(d, StackDepend('common')) self.assertNotEquals(d, Depend('common')) self.assertNotEquals(d, StackDepend('common2')) self.assertNotEquals(d, 1)
def test_Depend(self): from roslib.manifestlib import Depend, StackDepend, ManifestException for bad in [None, '']: try: Depend(bad) self.fail("should have failed on [%s]" % bad) except ValueError: pass d = Depend('roslib') self.assertEquals('roslib', str(d)) self.assertEquals('roslib', repr(d)) self.assertEquals('<depend package="roslib" />', d.xml()) self.assertEquals(d, Depend('roslib')) self.assertNotEquals(d, StackDepend('roslib')) self.assertNotEquals(d, Depend('roslib2')) self.assertNotEquals(d, 1)
def test_StackDepend(self): from roslib.manifestlib import Depend, StackDepend, ManifestException for bad in [None, '']: try: StackDepend(bad) self.fail("should have failed on [%s]" % bad) except ValueError: pass d = StackDepend('common') self.assertEquals('common', str(d)) self.assertEquals('common', repr(d)) self.assertEquals('<depend stack="common" />', d.xml()) self.assertEquals(d, StackDepend('common')) self.assertNotEquals(d, Depend('common')) self.assertNotEquals(d, StackDepend('common2')) self.assertNotEquals(d, 1)