mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
Fix up z3test to a) exist and b) work
This commit is contained in:
parent
cf56da8482
commit
4801a27c2d
5 changed files with 14 additions and 9 deletions
|
@ -148,7 +148,7 @@ setup(
|
|||
packages=['z3'],
|
||||
include_package_data=True,
|
||||
package_data={
|
||||
'z3': [os.path.join('lib', '*'), os.path.join('include', '*')]
|
||||
'z3': [os.path.join('lib', '*'), os.path.join('include', '*.h'), os.path.join('include', 'c++', '*.h')]
|
||||
},
|
||||
scripts=[os.path.join('bin', 'z3')],
|
||||
cmdclass={'build': build, 'develop': develop, 'sdist': sdist, 'bdist_egg': bdist_egg},
|
||||
|
|
|
@ -41,6 +41,7 @@ Z3 exceptions:
|
|||
... print("failed: %s" % ex)
|
||||
failed: sort mismatch
|
||||
"""
|
||||
from . import z3core
|
||||
from .z3core import *
|
||||
from .z3types import *
|
||||
from .z3consts import *
|
||||
|
|
|
@ -572,9 +572,4 @@ def isolate_roots(p, vs=[]):
|
|||
_vs[i] = vs[i].ast
|
||||
_roots = AstVector(Z3_algebraic_roots(p.ctx_ref(), p.as_ast(), num, _vs), p.ctx)
|
||||
return [ Numeral(r) for r in _roots ]
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
if doctest.testmod().failed:
|
||||
exit(1)
|
||||
|
||||
|
|
|
@ -5,9 +5,16 @@
|
|||
#
|
||||
# Author: Leonardo de Moura (leonardo)
|
||||
############################################
|
||||
import z3, doctest
|
||||
import z3, doctest, sys
|
||||
|
||||
if len(sys.argv) < 2 or sys.argv[1] == 'z3':
|
||||
r = doctest.testmod(z3.z3)
|
||||
elif sys.argv[1] == 'z3num':
|
||||
r = doctest.testmod(z3.z3num)
|
||||
else:
|
||||
print 'Usage: z3test.py (z3 | z3num)'
|
||||
sys.exit(1)
|
||||
|
||||
r = doctest.testmod(z3)
|
||||
if r.failed != 0:
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue