File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 3535 # to supply options, put them in 'env', like:
3636 env :
3737 CIBW_BEFORE_ALL_LINUX : yum install -y boost-devel zlib-devel
38+ CIBW_TEST_REQUIRES : pytest
39+ CIBW_TEST_COMMAND : " pytest --color=yes -v {project}/python/tests/test_pyapproxmc.py"
3840 CIBW_SKIP : " *musl*"
3941 CIBW_ARCHS : " auto64"
4042
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22import sys
33from array import array
4+ from pathlib import Path
45
56import pytest
67
@@ -25,7 +26,8 @@ def test_sampling_set():
2526def test_real_example ():
2627 counter = Counter (seed = 120 , epsilon = 0.8 , delta = 0.2 )
2728
28- with open ("test_1.cnf" ) as test_cnf :
29+ cnf_file = Path (__file__ ).parent / "test_1.cnf"
30+ with open (cnf_file ) as test_cnf :
2931 # Pop sampling set and metadata lines
3032 lines = test_cnf .readlines ()[2 :]
3133
@@ -51,7 +53,8 @@ def test_add_clauses_real_example():
5153 counter = Counter (seed = 120 , epsilon = 0.8 , delta = 0.2 )
5254 clauses = []
5355
54- with open ("test_1.cnf" ) as test_cnf :
56+ cnf_file = Path (__file__ ).parent / "test_1.cnf"
57+ with open ((cnf_file )) as test_cnf :
5558 # Pop sampling set and metadata lines
5659 lines = test_cnf .readlines ()[2 :]
5760
@@ -67,4 +70,5 @@ def test_add_clauses_real_example():
6770
6871
6972if __name__ == '__main__' :
70- pytest .main ([__file__ , '-v' ] + sys .argv [1 :])
73+ ret = pytest .main ([__file__ , '-v' ] + sys .argv [1 :])
74+ raise SystemExit (ret )
You can’t perform that action at this time.
0 commit comments