From 56214859c434ae2dfc80078985a40a29635cc074 Mon Sep 17 00:00:00 2001 From: Donny Winston Date: Mon, 11 May 2020 15:52:07 -0400 Subject: Use guess_format util to autodetect format --- test/test_parse_file_guess_format.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/test_parse_file_guess_format.py (limited to 'test') diff --git a/test/test_parse_file_guess_format.py b/test/test_parse_file_guess_format.py new file mode 100644 index 00000000..7ea1e959 --- /dev/null +++ b/test/test_parse_file_guess_format.py @@ -0,0 +1,17 @@ +import unittest + +from rdflib import Graph + + +class FileParserGuessFormatTest(unittest.TestCase): + def test_ttl(self): + g = Graph() + self.assertIsInstance(g.parse("test/w3c/turtle/IRI_subject.ttl"), Graph) + + def test_n3(self): + g = Graph() + self.assertIsInstance(g.parse("test/n3/example-lots_of_graphs.n3"), Graph) + + +if __name__ == '__main__': + unittest.main() -- cgit v1.2.1