summaryrefslogtreecommitdiff
path: root/test/python
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2021-04-12 12:31:43 -0700
committerGitHub <noreply@github.com>2021-04-12 19:31:43 +0000
commit7ec30058750611786b1b597816c8a23e28bb5812 (patch)
treee59b1de0078dc04d3a9c212cf9e6ebfd70cbb7f4 /test/python
parent7361b587e9a1b717dfa906d02f66feb6896e80dd (diff)
Refactor and update copyright headers. (#6316)
Diffstat (limited to 'test/python')
-rw-r--r--test/python/CMakeLists.txt39
-rw-r--r--test/python/unit/api/test_solver.py21
2 files changed, 32 insertions, 28 deletions
diff --git a/test/python/CMakeLists.txt b/test/python/CMakeLists.txt
index bc652bd10..f3566b6ec 100644
--- a/test/python/CMakeLists.txt
+++ b/test/python/CMakeLists.txt
@@ -1,28 +1,29 @@
-#####################
-## CMakeLists.txt
-## Top contributors (to current version):
-## Makai Mann and Yoni Zohar
-## This file is part of the CVC4 project.
-## Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
-## in the top-level source directory and their institutional affiliations.
-## All rights reserved. See the file COPYING in the top-level source
-## directory for licensing information.
+###############################################################################
+# Top contributors (to current version):
+# Yoni Zohar, Aina Niemetz, Mathias Preiner
+#
+# This file is part of the cvc5 project.
+#
+# Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+# in the top-level source directory and their institutional affiliations.
+# All rights reserved. See the file COPYING in the top-level source
+# directory for licensing information.
+# #############################################################################
+#
+# The build system configuration.
##
-#-----------------------------------------------------------------------------#
-# Add Python bindings API tests
# Check if the pytest Python module is installed.
check_python_module("pytest")
+# Add Python bindings API tests.
macro(cvc4_add_python_api_test name filename)
-
- # we create test target 'python/unit/api/myapitest'
- # and run it with 'ctest -R "python/unit/api/myapitest"'.
- add_test (NAME python/unit/api/${name}
- COMMAND ${PYTHON_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
- # directory for importing the python bindings
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src/api/python)
-
+# We create test target 'python/unit/api/myapitest' and run it with
+# 'ctest -R "python/unit/api/myapitest"'.
+add_test (NAME python/unit/api/${name}
+ COMMAND ${PYTHON_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
+ # directory for importing the python bindings
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src/api/python)
endmacro()
# add specific test files
diff --git a/test/python/unit/api/test_solver.py b/test/python/unit/api/test_solver.py
index 4ab0427c1..b4a19afa8 100644
--- a/test/python/unit/api/test_solver.py
+++ b/test/python/unit/api/test_solver.py
@@ -1,13 +1,16 @@
-#####################
-## test_solver.py
-## Top contributors (to current version):
-## Yoni Zohar
-## This file is part of the CVC4 project.
-## Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
-## in the top-level source directory and their institutional affiliations.
-## All rights reserved. See the file COPYING in the top-level source
-## directory for licensing information.
+###############################################################################
+# Top contributors (to current version):
+# Yoni Zohar
+#
+# This file is part of the cvc5 project.
+#
+# Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+# in the top-level source directory and their institutional affiliations.
+# All rights reserved. See the file COPYING in the top-level source
+# directory for licensing information.
+# #############################################################################
##
+
import pytest
import pycvc4
import sys
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback