From c57b5580ec0fd4c08219c19f42e152892a9be5e8 Mon Sep 17 00:00:00 2001 From: Tully Foote Date: Fri, 18 Dec 2009 04:17:25 +0000 Subject: [PATCH] fixing test on non ubuntu --- test/test_roslib/test/test_roslib_os_detect.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_roslib/test/test_roslib_os_detect.py b/test/test_roslib/test/test_roslib_os_detect.py index c684edc0..2cdbbc7c 100644 --- a/test/test_roslib/test/test_roslib_os_detect.py +++ b/test/test_roslib/test/test_roslib_os_detect.py @@ -135,8 +135,10 @@ class RoslibOsDetectTest(unittest.TestCase): def test_ubuntu_in_OSA(self): ubuntu = roslib.os_detect.Ubuntu() - ubuntu.check_presence = True - osa = roslib.os_detect.OSDetect() + def return_true(): + return True + ubuntu.check_presence = return_true + osa = roslib.os_detect.OSDetect([ubuntu]) self.assertEqual("ubuntu", ubuntu.get_name()) os_class = osa.get_os() self.assertEqual("ubuntu", os_class.get_name())