python: fix test_python with python2.7
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
http://www.hakank.org/google_or_tools/
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
from ortools.constraint_solver import pywrapcp
|
||||
|
||||
|
||||
@@ -40,11 +40,10 @@
|
||||
http://www.hakank.org/google_or_tools/
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from ortools.linear_solver import pywraplp
|
||||
|
||||
|
||||
def main(unused_argv):
|
||||
|
||||
# Create the solver.
|
||||
|
||||
# using CBC
|
||||
@@ -97,6 +96,5 @@ def main(unused_argv):
|
||||
print('walltime :', solver.WallTime(), 'ms')
|
||||
# print 'iterations:', solver.Iterations()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main('coin grids')
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
http://www.hakank.org/google_or_tools/
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
|
||||
from ortools.constraint_solver import pywrapcp
|
||||
|
||||
#
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
from __future__ import print_function
|
||||
from ortools.constraint_solver import pywrapcp
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
# Create the solver.
|
||||
solver = pywrapcp.Solver('Vendors scheduling')
|
||||
|
||||
#
|
||||
# data
|
||||
#
|
||||
|
||||
num_vendors = 9
|
||||
num_hours = 10
|
||||
num_work_types = 1
|
||||
@@ -96,6 +94,5 @@ def main():
|
||||
print('branches:', solver.Branches())
|
||||
print('WallTime:', solver.WallTime(), 'ms')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user