Skip to content

Commit

Permalink
Declare test dependencies in [test] extra (ros-infrastructure#881)
Browse files Browse the repository at this point in the history
Also make the 'mock' dependency conditional, now that this package
supports using unittest.mock.
  • Loading branch information
cottsay authored Jun 24, 2022
1 parent 36acfbb commit 4b52357
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ jobs:
python-version: ${{matrix.python}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install PyYAML argparse rospkg vcstools catkin_pkg python-dateutil rosdistro
python -m pip install -e .
python -m pip install pytest pytest-cov flake8 flake8-comprehensions mock codecov
python -m pip install -U -e .[test] codecov pytest-cov
- name: Run tests
run: |
python -m pytest test --cov
Expand Down
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
'packages': ['rosdep2', 'rosdep2.ament_packages', 'rosdep2.platforms'],
'package_dir': {'': 'src'},
'install_requires': ['catkin_pkg >= 0.4.0', 'rospkg >= 1.4.0', 'rosdistro >= 0.7.5', 'PyYAML >= 3.1', 'setuptools'],
'test_requires': ['mock', 'pytest'],
'extras_require': {
'test': [
'flake8',
'flake8-comprehensions',
"mock; python_version < '3.3'",
'pytest',
],
},
'author': 'Tully Foote, Ken Conley',
'author_email': '[email protected]',
'maintainer': 'ROS Infrastructure Team',
Expand Down

0 comments on commit 4b52357

Please sign in to comment.