Skip to content

Commit

Permalink
Use pytest to run Python bindings tests (#70)
Browse files Browse the repository at this point in the history
* Use pytest to run Python bindings tests

* Update CHANGELOG

* Add pytest to the dependencies in base Dockerfile

* Use pytest in build-test-python workflow

* Remove install of pytest

* 6.3.43 -> 6.3.44
  • Loading branch information
domire8 authored Feb 9, 2023
1 parent b10bf07 commit 31e68c0
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .github/actions/build-test-python/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export OSQP_INCLUDE_DIR='/usr/local/include/osqp'
pip3 install /github/workspace/python || (echo ">>> [ERROR] Build stage failed!" && exit 2) || exit $?

echo ">>> Running all test stages..."
python3 -m unittest discover /github/workspace/python --verbose \
|| (echo ">>> [ERROR] Test stage failed!" && exit 3) || exit $?
pytest /github/workspace/python -v || (echo ">>> [ERROR] Test stage failed!" && exit 3) || exit $?

echo ">>> Test stages completed successfully!"

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Release Versions:
- Add initialize method to Parameter class (#68)
- Allow Parameter construction with empty name (#67)
- Ignore data fields when copying an empty state (#71)
- Use pytest to run Python bindings tests (#70)

## 6.3.1

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

# install python requirements
RUN pip3 install numpy setuptools pybind11
RUN pip3 install pytest numpy setuptools pybind11

# install google dependencies
COPY --from=google-dependencies /usr/include/gtest /usr/include/gtest
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.43
6.3.44
2 changes: 1 addition & 1 deletion demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(control_libraries 6.3.43 CONFIG REQUIRED)
find_package(control_libraries 6.3.44 CONFIG REQUIRED)

set(DEMOS_SCRIPTS
task_space_control_loop
Expand Down
2 changes: 1 addition & 1 deletion doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Control Libraries"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 6.3.43
PROJECT_NUMBER = 6.3.44

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion protocol/clproto_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

project(clproto VERSION 6.3.43)
project(clproto VERSION 6.3.44)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand Down
2 changes: 1 addition & 1 deletion python/Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ RUN pip3 install .
FROM build as testing

COPY test test
RUN python3 -m unittest
RUN pytest

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# names of the environment variables that define osqp and openrobots include directories
osqp_path_var = 'OSQP_INCLUDE_DIR'

__version__ = "6.3.43"
__version__ = "6.3.44"
__libraries__ = ['state_representation', 'clproto', 'controllers', 'dynamical_systems', 'robot_model']
__include_dirs__ = ['include']

Expand Down
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

project(control_libraries VERSION 6.3.43)
project(control_libraries VERSION 6.3.44)

# Build options
option(BUILD_TESTING "Build all tests." OFF)
Expand Down

0 comments on commit 31e68c0

Please sign in to comment.