Beispiel #1
0
 def test_set(self):
     a = URN("urn:cts:latinLit:phi1294.phi002.perseus-lat2")
     a.reference = Reference("1.1")
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1")
     a.reference = "2.2"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi002.perseus-lat2:2.2")
     a.version = "perseus-eng2"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi002.perseus-eng2:2.2")
     a.work = "phi001"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi001.perseus-eng2:2.2")
     a.textgroup = "phi1293"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1293.phi001.perseus-eng2:2.2")
     a.namespace = "greekLit"
     self.assertEqual(str(a), "urn:cts:greekLit:phi1293.phi001.perseus-eng2:2.2")
Beispiel #2
0
 def test_set(self):
     a = URN("urn:cts:latinLit:phi1294.phi002.perseus-lat2")
     a.reference = Reference("1.1")
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1")
     a.reference = "2.2"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi002.perseus-lat2:2.2")
     a.version = "perseus-eng2"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi002.perseus-eng2:2.2")
     a.work = "phi001"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1294.phi001.perseus-eng2:2.2")
     a.textgroup = "phi1293"
     self.assertEqual(str(a), "urn:cts:latinLit:phi1293.phi001.perseus-eng2:2.2")
     a.namespace = "greekLit"
     self.assertEqual(str(a), "urn:cts:greekLit:phi1293.phi001.perseus-eng2:2.2")
Beispiel #3
0
 def test_set(self):
     a = URN("urn:cts:greekLit:textgroup")
     a.textgroup = "tg"
     self.assertEqual(a.textgroup, "tg")
     self.assertEqual(str(a), "urn:cts:greekLit:tg")
     a.namespace = "ns"
     self.assertEqual(a.namespace, "ns")
     self.assertEqual(str(a), "urn:cts:ns:tg")
     a.work = "wk"
     self.assertEqual(a.work, "wk")
     self.assertEqual(str(a), "urn:cts:ns:tg.wk")
     a.reference = "1-2"
     self.assertEqual(a.reference, Reference("1-2"))
     self.assertEqual(str(a), "urn:cts:ns:tg.wk:1-2")
     a.version = "vs"
     self.assertEqual(a.version, "vs")
     self.assertEqual(str(a), "urn:cts:ns:tg.wk.vs:1-2")
Beispiel #4
0
 def test_set(self):
     a = URN("urn:cts:greekLit:textgroup")
     a.textgroup = "tg"
     self.assertEqual(a.textgroup, "tg")
     self.assertEqual(str(a), "urn:cts:greekLit:tg")
     a.namespace = "ns"
     self.assertEqual(a.namespace, "ns")
     self.assertEqual(str(a), "urn:cts:ns:tg")
     a.work = "wk"
     self.assertEqual(a.work, "wk")
     self.assertEqual(str(a), "urn:cts:ns:tg.wk")
     a.reference = "1-2"
     self.assertEqual(a.reference, Reference("1-2"))
     self.assertEqual(str(a), "urn:cts:ns:tg.wk:1-2")
     a.version = "vs"
     self.assertEqual(a.version, "vs")
     self.assertEqual(str(a), "urn:cts:ns:tg.wk.vs:1-2")