diff options
author | Donny Winston <dwinston@alum.mit.edu> | 2020-05-11 15:52:07 -0400 |
---|---|---|
committer | Donny Winston <dwinston@alum.mit.edu> | 2020-05-11 15:52:07 -0400 |
commit | 56214859c434ae2dfc80078985a40a29635cc074 (patch) | |
tree | dd4b957059188a9aa1a622106a272a25376bedfe /test | |
parent | a3245fb1fac921a5d8e07bce80914c42f5399b32 (diff) | |
download | rdflib-56214859c434ae2dfc80078985a40a29635cc074.tar.gz |
Use guess_format util to autodetect format
Diffstat (limited to 'test')
-rw-r--r-- | test/test_parse_file_guess_format.py | 17 |
1 files changed, 17 insertions, 0 deletions
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() |