Пример #1
0
	def test_doubles(self):
		d_input = [[20.1,25.2], [25.0,30.3], [45.1,55.5]]
		d_expected = [[20.1,25.0,45.1],[25.2,30.3,55.5]]
		d = Integration()
		d.set_input(d_input)
		d.integrate(0,[])
		d_result = d.get_solutions()
		d.set_orders(d_result)
		self.assertEqual(d_expected,d.get_orders(),"Result doesn't match")
Пример #2
0
from integration import Integration
import sys

inFile = sys.argv[1]
f = open(inFile,'r')
input = f.read().splitlines()

f.close()

fretes = [float(x) for x in input[0].split(',')]
itens = [float(x) for x in input[1].split(',')]
totais = [float(x) for x in input[2].split(',')]

input = [fretes,itens,totais]
i = Integration()
i.set_input(input)
i.integrate(0,[])
i.set_orders(i.get_solutions())
i.pretty_print()