diff options
author | David Robillard <d@drobilla.net> | 2014-08-08 02:46:37 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-08-08 02:46:37 +0000 |
commit | 158720c60a998e5c08bf8babc3b8efc0455e2fc3 (patch) | |
tree | 2907a461e03179c4e208d8691578c6223319d8f3 | |
parent | 5a132332a6b00417d2f954939cbafeacdcd0c0ac (diff) | |
download | serd-158720c60a998e5c08bf8babc3b8efc0455e2fc3.tar.gz serd-158720c60a998e5c08bf8babc3b8efc0455e2fc3.tar.bz2 serd-158720c60a998e5c08bf8babc3b8efc0455e2fc3.zip |
Fix wscript for anciet Python 2.4.
git-svn-id: http://svn.drobilla.net/serd/trunk@466 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r-- | wscript | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -270,6 +270,14 @@ def file_equals(patha, pathb, subst_from='', subst_to=''): def earl_assertion(test, passed, asserter): import datetime + asserter_str = '' + if asserter is not None: + asserter_str = '\n\tearl:assertedBy <%s> ;' % asserter + + passed_str = 'earl:failed' + if passed: + passed_str = 'earl:passed' + return ''' [] a earl:Assertion ;%s @@ -280,9 +288,9 @@ def earl_assertion(test, passed, asserter): earl:outcome %s ; dc:date "%s"^^xsd:dateTime ] . -''' % (('\n\tearl:assertedBy <%s> ;' % asserter) if asserter else '', +''' % (asserter_str, test, - "earl:passed" if passed else "earl:failed", + passed_str, datetime.datetime.now().replace(microsecond=0).isoformat()) def test_thru(ctx, base, path, check_filename, flags): @@ -325,8 +333,9 @@ def test_manifest(ctx, srcdir, testdir, report, base_uri): rdflib.URIRef(base_uri + 'manifest.ttl'), format='n3') - is_drobilla = (os.getenv('USER') == 'drobilla') - asserter = 'http://drobilla.net/drobilla#me' if is_drobilla else '' + asserter = '' + if os.getenv('USER') == 'drobilla': + asserter = 'http://drobilla.net/drobilla#me' def run_test(action_node, expected_return): output = os.path.join('tests', testdir, action_node + '.out') |