Update project layout
This commit is contained in:
parent
ea70d9278e
commit
b777df7874
15 changed files with 127 additions and 107 deletions
21
test/run_tests.py
Normal file
21
test/run_tests.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from xopp2py import parser, abstract_syntax
|
||||
from xopp2oml import writer
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
DATADIR = os.path.join(os.path.dirname(__file__), "test_data")
|
||||
|
||||
class DummyOutput:
|
||||
def write(self, text: str):
|
||||
pass
|
||||
|
||||
def parse(filename):
|
||||
asyntax = parser.parseFile(os.path.join(DATADIR, filename))
|
||||
writer.writeOML(asyntax, filename, "my_xopp", DummyOutput())
|
||||
|
||||
# Just see if these files parse without throwing an exception :)
|
||||
parse("SmallXournalFile.xopp")
|
||||
parse("TwoHiddenLayers.xopp")
|
||||
|
||||
|
||||
print("Tests passed.")
|
||||
Loading…
Add table
Add a link
Reference in a new issue