1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-11-21 14:02:28 +00:00

Add print_function for py2

This commit is contained in:
J. Fernando Sánchez 2019-02-15 13:46:37 +01:00
parent ea0b4748b6
commit 9937490213
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import sys import sys
from future.standard_library import install_aliases from future.standard_library import install_aliases, print_function
install_aliases() install_aliases()
from urllib import request, parse from urllib import request, parse
@ -124,4 +124,4 @@ def check(testname):
definition = solution(testname) definition = solution(testname)
if definition is None: if definition is None:
raise Exception('The definition for {} is empty or invalid.'.format(testname)) raise Exception('The definition for {} is empty or invalid.'.format(testname))
return test(definition) return test(definition)

View File

@ -1,3 +1,4 @@
from future.standard_library import print_function
import operator import operator
import types import types
import sys import sys
@ -90,4 +91,4 @@ def test_example(g):
len(g)) len(g))
test('A person has been defined', test('A person has been defined',
g.subjects(RDF.type, term.URIRef('http://xmlns.com/foaf/0.1/Person'))) g.subjects(RDF.type, term.URIRef('http://xmlns.com/foaf/0.1/Person')))
print('All tests passed. Well done!') print('All tests passed. Well done!')