blob: 879486d81fb5c08d7bfa54944cc70308bcfa1d0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
from fractions import Fraction
from rdflib import Graph, ConjunctiveGraph, Literal, URIRef
import unittest
class TestIssue953(unittest.TestCase):
def test_issue_939(self):
lit = Literal(Fraction("2/3"))
assert lit.datatype == URIRef("http://www.w3.org/2002/07/owl#rational")
assert lit.n3() == '"2/3"^^<http://www.w3.org/2002/07/owl#rational>'
if __name__ == "__main__":
unittest.main()
|