File: test_create_input_source.py

package info (click to toggle)
rdflib 6.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,248 kB
  • sloc: python: 39,216; sh: 153; makefile: 110
file content (25 lines) | stat: -rw-r--r-- 627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import unittest

from rdflib.parser import create_input_source


class ParserTestCase(unittest.TestCase):
    def test_empty_arguments(self):
        """create_input_source() function must receive exactly one argument."""
        self.assertRaises(
            ValueError,
            create_input_source,
        )

    def test_too_many_arguments(self):
        """create_input_source() function has a few conflicting arguments."""
        self.assertRaises(
            ValueError,
            create_input_source,
            source="a",
            location="b",
        )


if __name__ == "__main__":
    unittest.main()