Skip to content

Commit 190678f

Browse files
committed
Py3 Runtime: distribute the tests
1 parent 86610fd commit 190678f

File tree

8 files changed

+18
-23
lines changed

8 files changed

+18
-23
lines changed

contributors.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,5 @@ YYYY/MM/DD, github id, Full name, email
279279
2020/10/16, adarshbhat, Adarsh Bhat, [email protected]
280280
2020/10/20, adamwojs, Adam Wójs, adam[at]wojs.pl
281281
2020/10/24, cliid, Jiwu Jang, [email protected]
282-
2020/11/05, MichelHartmann, Michel Hartmann, [email protected]
282+
2020/11/05, MichelHartmann, Michel Hartmann, [email protected]
283+
2020/11/26, mr-c, Michael R. Crusoe, [email protected]

runtime/Python3/MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
include *.txt
1+
include *.txt
2+
recursive-include test *.py

runtime/Python3/setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
setup(
44
name='antlr4-python3-runtime',
55
version='4.9',
6-
packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'],
7-
package_dir={'': 'src'},
6+
packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree',
7+
'antlr4.error', 'antlr4.xpath', 'antlr4.test',
8+
'antlr4.test.mocks', 'antlr4.test.expr',
9+
'antlr4.test.parser'],
10+
package_dir={'': 'src',
11+
'antlr4.test': 'test', },
812
install_requires=[
913
"typing ; python_version<'3.5'",
1014
],
1115
url='http://www.antlr.org',
1216
license='BSD',
1317
author='Eric Vergnaud, Terence Parr, Sam Harwell',
1418
author_email='[email protected]',
19+
scripts=["bin/pygrun"],
1520
description='ANTLR 4.9 runtime for Python 3.7'
1621
)

runtime/Python3/test/TestTokenStreamRewriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import unittest
66

77

8-
from mocks.TestLexer import TestLexer, TestLexer2
8+
from antlr4.test.mocks.TestLexer import TestLexer, TestLexer2
99
from antlr4.TokenStreamRewriter import TokenStreamRewriter
1010
from antlr4.InputStream import InputStream
1111
from antlr4.CommonTokenStream import CommonTokenStream

runtime/Python3/test/ctest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import sys
88
sys.setrecursionlimit(4000)
99
import antlr4
10-
from parser.cparser import CParser
11-
from parser.clexer import CLexer
10+
from antlr4.test.parser.cparser import CParser
11+
from antlr4.test.parser.clexer import CLexer
1212
from datetime import datetime
1313
import cProfile
1414

@@ -47,4 +47,4 @@ def main():
4747
# print(str(after-before))
4848

4949
if __name__ == '__main__':
50-
cProfile.run("main()", sort='tottime')
50+
cProfile.run("main()", sort='tottime')

runtime/Python3/test/expr/__init__.py

Whitespace-only changes.

runtime/Python3/test/run.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

runtime/Python3/test/xpathtest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from antlr4 import InputStream, CommonTokenStream, TerminalNode
33
from antlr4.xpath.XPath import XPath
44
import unittest
5-
from expr.ExprParser import ExprParser
6-
from expr.ExprLexer import ExprLexer
5+
from antlr4.test.expr.ExprParser import ExprParser
6+
from antlr4.test.expr.ExprLexer import ExprLexer
77

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

8888
if __name__ == '__main__':
89-
unittest.main()
89+
unittest.main()

0 commit comments

Comments
 (0)