コード例 #1
0
 def test_GTS_highlights(self):
     gts = GTS('HIGHLIGHTEDTEXTIMPORTANT', highlights=((0, 11), (18, 24)))
     self.assertEqual(gts.to_er7(),
                      '\\H\\HIGHLIGHTED\\N\\TEXTIMP\\H\\ORTANT\\N\\')
コード例 #2
0
 def test_GTS_subcomponent_escape(self):
     gts = GTS('&subcomponent&')
     self.assertEqual(gts.to_er7(), '\\T\\subcomponent\\T\\')
コード例 #3
0
 def test_GTS_repetition_escape(self):
     gts = GTS('~repetition~')
     self.assertEqual(gts.to_er7(), '\\R\\repetition\\R\\')
コード例 #4
0
 def test_GTS_field_escaping(self):
     gts = GTS('|field|')
     self.assertEqual(gts.to_er7(), '\\F\\field\\F\\')
コード例 #5
0
 def test_GTS_component_escape(self):
     gts = GTS('^component^')
     self.assertEqual(gts.to_er7(), '\\S\\component\\S\\')
コード例 #6
0
ファイル: test_datatypes.py プロジェクト: tomchiverton/hl7apy
 def test_GTS_highlights(self):
     gts = GTS('HIGHLIGHTEDTEXTIMPORTANT', highlights=((0,11), (18,24)))
     self.assertEqual(gts.to_er7(), '\\H\\HIGHLIGHTED\\N\\TEXTIMP\\H\\ORTANT\\N\\')
コード例 #7
0
 def test_GTS(self):
     text = 'This is a GTS datatype text'
     gts = GTS(text)
     self.assertEqual(gts.classname, 'GTS')
     self.assertEqual(gts.to_er7(), text)
コード例 #8
0
ファイル: test_datatypes.py プロジェクト: tomchiverton/hl7apy
 def test_GTS_repetition_escape(self):
     gts = GTS('~repetition~')
     self.assertEqual(gts.to_er7(), '\\R\\repetition\\R\\')
コード例 #9
0
ファイル: test_datatypes.py プロジェクト: tomchiverton/hl7apy
 def test_GTS_subcomponent_escape(self):
     gts = GTS('&subcomponent&')
     self.assertEqual(gts.to_er7(), '\\T\\subcomponent\\T\\')
コード例 #10
0
ファイル: test_datatypes.py プロジェクト: tomchiverton/hl7apy
 def test_GTS_component_escape(self):
     gts = GTS('^component^')
     self.assertEqual(gts.to_er7(), '\\S\\component\\S\\')
コード例 #11
0
ファイル: test_datatypes.py プロジェクト: tomchiverton/hl7apy
 def test_GTS_field_escaping(self):
     gts = GTS('|field|')
     self.assertEqual(gts.to_er7(), '\\F\\field\\F\\')
コード例 #12
0
ファイル: test_datatypes.py プロジェクト: tomchiverton/hl7apy
 def test_GTS(self):
     text = 'This is a GTS datatype text'
     gts = GTS(text)
     self.assertEqual(gts.classname, 'GTS')
     self.assertEqual(gts.to_er7(), text)