diff options
author | nicholascar <nicholas.car@surroundaustralia.com> | 2021-12-03 22:49:08 +1000 |
---|---|---|
committer | nicholascar <nicholas.car@surroundaustralia.com> | 2021-12-03 22:49:08 +1000 |
commit | e0a636c90f957121c9db5eb2f4e35f5aa295161a (patch) | |
tree | ec6b3c64438c6fc7f83b61eaf334cf03c5f0b43b | |
parent | 96ccb408e5ed2d48b72af81ff38cb56c20f7e0d5 (diff) | |
download | rdflib-e0a636c90f957121c9db5eb2f4e35f5aa295161a.tar.gz |
ensure both tests actually test
-rw-r--r-- | test/test_serialize_hext.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/test_serialize_hext.py b/test/test_serialize_hext.py index 94394a7c..0d6fe992 100644 --- a/test/test_serialize_hext.py +++ b/test/test_serialize_hext.py @@ -24,7 +24,19 @@ def test_hext_graph(): g.parse(data=turtle_data, format="turtle") out = g.serialize(format="hext") - print(out) + testing_lines = [ + [False, '["http://example.com/s1", "http://example.com/p1", "http://example.com/o2", "", ""'], + [False, '["http://example.com/s1", "http://example.com/p3", Object 3, "", ""'], + [False, '["http://example.com/s1", "http://example.com/p5", 42, "http://www.w3.org/2001/XMLSchema#integer", ""'], + [False, '"http://www.w3.org/1999/02/22-rdf-syntax-ns#value", thingy, "", ""'], + [False, '["http://example.com/s1", "http://example.com/p4", 2021-12-03, "http://www.w3.org/2001/XMLSchema#date", ""'] + ] + for line in out.splitlines(): + for test in testing_lines: + if test[1] in line: + test[0] = True + + assert all([x[0] for x in testing_lines]) def test_hext_dataset(): |