Skip to content

Commit

Permalink
Py3 Runtime: distribute the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Nov 26, 2020
1 parent 86610fd commit 190678f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
3 changes: 2 additions & 1 deletion contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,5 @@ YYYY/MM/DD, github id, Full name, email
2020/10/16, adarshbhat, Adarsh Bhat, adarshbhat@users.noreply.github.com
2020/10/20, adamwojs, Adam Wójs, adam[at]wojs.pl
2020/10/24, cliid, Jiwu Jang, jiwujang@naver.com
2020/11/05, MichelHartmann, Michel Hartmann, MichelHartmann@users.noreply.github.com
2020/11/05, MichelHartmann, Michel Hartmann, MichelHartmann@users.noreply.github.com
2020/11/26, mr-c, Michael R. Crusoe, 1330696+mr-c@users.noreply.github.com
3 changes: 2 additions & 1 deletion runtime/Python3/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include *.txt
include *.txt
recursive-include test *.py
9 changes: 7 additions & 2 deletions runtime/Python3/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
setup(
name='antlr4-python3-runtime',
version='4.9',
packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'],
package_dir={'': 'src'},
packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree',
'antlr4.error', 'antlr4.xpath', 'antlr4.test',
'antlr4.test.mocks', 'antlr4.test.expr',
'antlr4.test.parser'],
package_dir={'': 'src',
'antlr4.test': 'test', },
install_requires=[
"typing ; python_version<'3.5'",
],
url='http://www.antlr.org',
license='BSD',
author='Eric Vergnaud, Terence Parr, Sam Harwell',
author_email='eric.vergnaud@wanadoo.fr',
scripts=["bin/pygrun"],
description='ANTLR 4.9 runtime for Python 3.7'
)
2 changes: 1 addition & 1 deletion runtime/Python3/test/TestTokenStreamRewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import unittest


from mocks.TestLexer import TestLexer, TestLexer2
from antlr4.test.mocks.TestLexer import TestLexer, TestLexer2
from antlr4.TokenStreamRewriter import TokenStreamRewriter
from antlr4.InputStream import InputStream
from antlr4.CommonTokenStream import CommonTokenStream
Expand Down
6 changes: 3 additions & 3 deletions runtime/Python3/test/ctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import sys
sys.setrecursionlimit(4000)
import antlr4
from parser.cparser import CParser
from parser.clexer import CLexer
from antlr4.test.parser.cparser import CParser
from antlr4.test.parser.clexer import CLexer
from datetime import datetime
import cProfile

Expand Down Expand Up @@ -47,4 +47,4 @@ def main():
# print(str(after-before))

if __name__ == '__main__':
cProfile.run("main()", sort='tottime')
cProfile.run("main()", sort='tottime')
Empty file.
12 changes: 0 additions & 12 deletions runtime/Python3/test/run.py

This file was deleted.

6 changes: 3 additions & 3 deletions runtime/Python3/test/xpathtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from antlr4 import InputStream, CommonTokenStream, TerminalNode
from antlr4.xpath.XPath import XPath
import unittest
from expr.ExprParser import ExprParser
from expr.ExprLexer import ExprLexer
from antlr4.test.expr.ExprParser import ExprParser
from antlr4.test.expr.ExprLexer import ExprLexer

def tokenToString(token, ruleNames):
if isinstance(token, TerminalNode):
Expand Down Expand Up @@ -86,4 +86,4 @@ def testValidPaths(self):
self.assertEqual(res_str, expected, "Failed test %s" % path)

if __name__ == '__main__':
unittest.main()
unittest.main()

0 comments on commit 190678f

Please sign in to comment.