Commit 5bf48bcd authored by Guilhem Saurel's avatar Guilhem Saurel

[Tests][Python] Add minimalistic python test

parent e68db112
......@@ -5,3 +5,7 @@ target_link_libraries(add ${PROJECT_NAME})
ADD_UNIT_TEST(boost_add boost_add)
target_link_libraries(boost_add ${PROJECT_NAME} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if(BUILD_PYTHON_INTERFACE)
add_subdirectory(python)
endif()
ADD_PYTHON_UNIT_TEST("py-add" "tests/python/test_add.py" "python")
import unittest
import example_adder as exa
class TestAdder(unittest.TestCase):
def test_adder_integers(self):
self.assertEqual(exa.add(4, 3), 7)
self.assertEqual(exa.sub(4, 3), 1)
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment