Пример #1
0
def test_resolve_confused_context_appendix():
    tokenized = [tokens.Context([None, 'Appendix:A', '12'])]
    converted = amdparser.resolve_confused_context(tokenized,
                                                   ['123', 'Interpretations'])
    assert converted == [
        tokens.Context([None, 'Interpretations', 'A', '(12)'])
    ]
 def test_resolve_confused_context_appendix(self):
     tokenized = [tokens.Context([None, 'Appendix:A', '12'])]
     converted = amdparser.resolve_confused_context(
         tokenized, ['123', 'Interpretations'])
     self.assertEqual(
         converted, [tokens.Context([None, 'Interpretations', 'A',
                                     '(12)'])])
Пример #3
0
def test_resolve_confused_context():
    tokenized = [tokens.Context([None, None, '12', 'a', '2', 'iii'])]
    converted = amdparser.resolve_confused_context(tokenized,
                                                   ['123', 'Interpretations'])
    assert converted == [
        tokens.Context([None, 'Interpretations', '12', '(a)(2)(iii)'])
    ]
 def test_resolve_confused_context(self):
     tokenized = [tokens.Context([None, None, '12', 'a', '2', 'iii'])]
     converted = amdparser.resolve_confused_context(
         tokenized, ['123', 'Interpretations'])
     self.assertEqual(
         converted, [tokens.Context([None, 'Interpretations', '12',
                                     '(a)(2)(iii)'])])