Skip to content

Commit

Permalink
python 3 compatibility (ros#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Dec 31, 2013
1 parent 5362586 commit c096c2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion rospy_tutorials/test/test_add_two_ints.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

## Integration test for add_two_ints

from __future__ import print_function

PKG = 'rospy_tutorials'
NAME = 'add_two_ints_test'

Expand All @@ -45,7 +47,6 @@
import rostest
from rospy_tutorials.srv import *


class TestAddTwoInts(unittest.TestCase):

def test_add_two_ints(self):
Expand Down
2 changes: 1 addition & 1 deletion rospy_tutorials/test/test_on_shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, *args):
self.success = False

def callback(self, data):
print(rospy.get_caller_id(), "I heard %s"%data.data_)
print(rospy.get_caller_id(), "I heard %s" % data.data)
#greetings is only sent over peer_publish callback, so hearing it is a success condition
if "I'm dead" in data.data:
self.success = True
Expand Down
2 changes: 1 addition & 1 deletion rospy_tutorials/test/test_peer_subscribe_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, *args):
self.success = False

def callback(self, data):
print(rospy.get_caller_id(), "I heard %s" % data.data_)
print(rospy.get_caller_id(), "I heard %s" % data.data)
#greetings is only sent over peer_publish callback, so hearing it is a success condition
if data.data.startswith('greetings'):
self.success = True
Expand Down

0 comments on commit c096c2b

Please sign in to comment.