aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wscript23
1 files changed, 23 insertions, 0 deletions
diff --git a/wscript b/wscript
index ca8bd013..6b89706c 100644
--- a/wscript
+++ b/wscript
@@ -3,6 +3,7 @@
import glob
import io
import os
+import sys
from waflib import Logs, Options
from waflib.extras import autowaf
@@ -444,6 +445,28 @@ def test(tst):
check([serdi, 'file://%s/tests/good/manifest.ttl' % srcdir],
stdout='/dev/full', name='Write error')
+ if sys.version_info.major >= 3:
+ from waflib.extras import autoship
+ try:
+ import rdflib
+ with tst.group('NEWS') as check:
+ news_path = os.path.join(srcdir, 'NEWS')
+ entries = autoship.read_news(top=srcdir)
+ autoship.write_news(entries, 'NEWS.norm')
+ check.file_equals(news_path, 'NEWS.norm')
+
+ meta_path = os.path.join(srcdir, 'serd.ttl')
+ autoship.write_news(entries, 'NEWS.ttl',
+ format='turtle', template=meta_path)
+
+ ttl_entries = autoship.read_news('NEWS.ttl',
+ top=srcdir, format='turtle')
+
+ autoship.write_news(ttl_entries, 'NEWS.round')
+ check.file_equals(news_path, 'NEWS.round')
+ except ImportError:
+ Logs.warn('Failed to import rdflib, not running NEWS tests')
+
# Serd-specific test suites
serd_base = 'http://drobilla.net/sw/serd/tests/'
test_suite(tst, serd_base + 'good/', 'good', None, 'Turtle')