fixing test on non ubuntu
This commit is contained in:
parent
d5b3098652
commit
c57b5580ec
|
@ -135,8 +135,10 @@ class RoslibOsDetectTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_ubuntu_in_OSA(self):
|
def test_ubuntu_in_OSA(self):
|
||||||
ubuntu = roslib.os_detect.Ubuntu()
|
ubuntu = roslib.os_detect.Ubuntu()
|
||||||
ubuntu.check_presence = True
|
def return_true():
|
||||||
osa = roslib.os_detect.OSDetect()
|
return True
|
||||||
|
ubuntu.check_presence = return_true
|
||||||
|
osa = roslib.os_detect.OSDetect([ubuntu])
|
||||||
self.assertEqual("ubuntu", ubuntu.get_name())
|
self.assertEqual("ubuntu", ubuntu.get_name())
|
||||||
os_class = osa.get_os()
|
os_class = osa.get_os()
|
||||||
self.assertEqual("ubuntu", os_class.get_name())
|
self.assertEqual("ubuntu", os_class.get_name())
|
||||||
|
|
Loading…
Reference in New Issue