Skip to content

Commit

Permalink
add test to check if rosdep correctly install python-lxml, see ros/ro…
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Dec 28, 2021
1 parent 5e0ae4e commit d4ddca1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if(CATKIN_ENABLE_TESTING)
# Check if rosdep is correctly install scipy
if ("$ENV{ROS_DISTRO}" STRGREATER "hydro") # hydro does not install pip scipy
catkin_add_nosetests(test/test_scipy.py)
catkin_add_nosetests(test/test_lxml.py)
endif()
endif()

Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<build_depend condition="$ROS_PYTHON_VERSION == 3">python3</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 2">python-scipy</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 3">python3-scipy</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 2">python-lxml</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 3">python3-lxml</build_depend>
<build_depend>catkin</build_depend>
<build_depend>rostest</build_depend>
<test_depend>rospy_tutorials</test_depend>
Expand Down
18 changes: 18 additions & 0 deletions test/test_lxml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function

import sys
import unittest

class TestLexml(unittest.TestCase):

def test_lxml(self):

import lxml
print(lxml)
self.assertTrue('true')

if __name__ == '__main__':
unittest.main()

0 comments on commit d4ddca1

Please sign in to comment.