diff options
author | gromgull <gromgull@gmail.com> | 2012-07-18 17:39:01 +0200 |
---|---|---|
committer | gromgull <gromgull@gmail.com> | 2012-07-18 17:39:01 +0200 |
commit | 38dd72a936e6dc645bb335ee9d7db248c0098bcd (patch) | |
tree | 8ac70aaa2ee97499af178d6bf67c90cf8ace825c /test/test_n3_suite.py | |
parent | 40b3cb12662660ca27eaadd4b93ffc641f985337 (diff) | |
download | rdflib-38dd72a936e6dc645bb335ee9d7db248c0098bcd.tar.gz |
cleaned up tests, removed duplicates, more sensible names
Diffstat (limited to 'test/test_n3_suite.py')
-rw-r--r-- | test/test_n3_suite.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/test_n3_suite.py b/test/test_n3_suite.py new file mode 100644 index 00000000..35ec8a10 --- /dev/null +++ b/test/test_n3_suite.py @@ -0,0 +1,33 @@ +import os +import sys +import unittest + +try: + from testutils import check_serialize_parse +except: + from test.testutils import check_serialize_parse + +def _get_test_files_formats(): + skiptests = [ + 'strquot.n3', + ] + for f in os.listdir('test/n3'): + if f not in skiptests: + fpath = "test/n3/"+f + if f.endswith('.rdf'): + yield fpath, 'xml' + elif f.endswith('.n3'): + yield fpath, 'n3' + + +if __name__ == "__main__": + class TestN3Writing(unittest.TestCase): + def testWriting(self): + for fpath, fmt in _get_test_files_formats(): + check_serialize_parse(fpath, fmt, 'n3') + if len(sys.argv) > 1: + check_serialize_parse(sys.argv[1], 'n3','n3', True) + sys.exit() + else: + unittest.main() + |