In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

Commit 6a14734a authored by eckhart's avatar eckhart

- fixed doctest and syntaxtree.Node.__str__()

parent 37746fdc
......@@ -277,9 +277,7 @@ class Node(collections.abc.Sized):
def __str__(self):
# s = self._content if self._content is not None else \
# "".join(str(child) for child in self.children) if self.children else self.content
s = self.content
s = "".join(str(child) for child in self.children) if self.children else self.content
if self.errors:
return ' <<< Error on "%s" | %s >>> ' % \
(s, '; '.join(e.message for e in self.errors))
......@@ -838,7 +836,7 @@ def parse_sxpr(sxpr: str) -> Node:
Example:
>>> parse_sxpr("(a (b c))").as_sxpr()
'(a\\n (b\\n "c"\\n )\\n)'
'(a\\n (b\\n "c"\\n )\\n)'
"""
sxpr = StringView(sxpr).strip()
mock_parsers = dict()
......
#!/bin/sh
# CFLAGS="-O3 -march=native -mtune=native"
python3 setup.py build_ext --inplace
python37 setup.py build_ext --inplace
......@@ -237,7 +237,7 @@ class LaTeXGrammar(Grammar):
paragraph = Forward()
tabular_config = Forward()
text_element = Forward()
source_hash__ = "79c6f2eaa821f7e92346e0ff24e7c5f8"
source_hash__ = "1329c620430169c2cbeff23b05e049c3"
parser_initialization__ = "upon instantiation"
COMMENT__ = r'%.*'
WHITESPACE__ = r'[ \t]*(?:\n(?![ \t]*\n)[ \t]*)?'
......
#!/usr/bin/python
"""Runs the dhparser test-suite with several installed interpreters"""
if __name__ == "__main__":
import os
......@@ -8,14 +10,15 @@ if __name__ == "__main__":
# print("Running nosetests:")
# os.system("nosetests test")
interpreter = 'python '
# interpreter = r'C:\Users\di68kap\AppData\Local\Programs\Python\Python37-32\python.exe '
interpreters = ['python ', 'pypy3 ', 'python37 ']
# interpreters = [r'C:\Users\di68kap\AppData\Local\Programs\Python\Python37-32\python.exe ']
os.system(interpreter + '--version')
for interpreter in interpreters:
os.system(interpreter + '--version')
assert os.getcwd().endswith('test')
files = os.listdir()
for filename in files:
if filename.startswith('test_'):
print('\nTEST ' + filename)
os.system(interpreter + filename)
assert os.getcwd().endswith('test')
files = os.listdir()
for filename in files:
if filename.startswith('test_'):
print('\nTEST ' + filename)
os.system(interpreter + filename)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment