Remove useless comments

This commit is contained in:
Salvo 'LtWorf' Tomaselli 2015-07-14 01:18:54 +02:00
parent 9416a9fef9
commit a655e81b28

View File

@ -1,6 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# coding=UTF-8
# Relational # Relational
# Copyright (C) 2010 Salvo "LtWorf" Tomaselli # Copyright (C) 2010 Salvo "LtWorf" Tomaselli
# #
@ -168,10 +166,10 @@ def run_py_test(testname):
try: try:
expr = readfile('%s%s.python' % (tests_path, testname)) expr = readfile('%s%s.python' % (tests_path, testname))
result = eval(expr, rels) # Evaluating the expression result = eval(expr, rels)
expr = readfile('%s%s.result' % (tests_path, testname)) expr = readfile('%s%s.result' % (tests_path, testname))
exp_result = eval(expr, rels) # Evaluating the expression exp_result = eval(expr, rels)
if result == exp_result: if result == exp_result:
print (colorize('Test passed', COLOR_GREEN)) print (colorize('Test passed', COLOR_GREEN))
@ -210,14 +208,13 @@ def run_test(testname):
query = readfile('%s%s.query' % (tests_path, testname)).strip() query = readfile('%s%s.query' % (tests_path, testname)).strip()
o_query = optimizer.optimize_all(query, rels) o_query = optimizer.optimize_all(query, rels)
expr = parser.parse(query) # Converting expression to python string expr = parser.parse(query)
result = eval(expr, rels) # Evaluating the expression result = expr(rels)
o_expr = parser.parse( o_expr = parser.parse(o_query)
o_query) # Converting expression to python string o_result = o_expr(rels)
o_result = eval(o_expr, rels) # Evaluating the expression
c_expr = parser.tree(query).toCode() # Converting to python code c_expr = parser.tree(query).toCode()
c_result = eval(c_expr, rels) c_result = eval(c_expr, rels)
if (o_result == result_rel) and (result == result_rel) and (c_result == result_rel): if (o_result == result_rel) and (result == result_rel) and (c_result == result_rel):