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