Skip to content

Commit da30bb5

Browse files
Merge pull request #54 from MarcellPerger1/refactor-test-dir
Reorganise `test/` directory
2 parents 05f1134 + faf3d88 commit da30bb5

24 files changed

+248
-275
lines changed

test/common/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .common import CommonTestCase, TokenStreamFlag
2+
from .snapshottest import SnapshotTestCase, SnapshotsNotFound, CantUpdateSnapshots
3+
from .utils import TestCaseUtils

test/common.py renamed to test/common/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from parser.cst.treegen import TreeGen, CstParseError
1515
from parser.lexer import Tokenizer
1616
from parser.lexer.tokens import Token, OpToken
17-
from test.snapshottest import SnapshotTestCase
18-
from test.utils import TestCaseUtils
17+
from test.common.snapshottest import SnapshotTestCase
18+
from test.common.utils import TestCaseUtils
1919

2020

2121
def _strict_boundary_kwargs():

test/utils.py renamed to test/common/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def setProperCwd(self):
6969
return
7070
self._old_cwd = os.getcwd()
7171
dirname = Path(__file__).parent
72-
os.chdir(dirname.parent)
72+
os.chdir(dirname.parent.parent)
7373
assert self.isProperCwdSet()
7474
self.addCleanup(self.resetCwd)
7575

File renamed without changes.

test/test_integration/.snapshots/test_treegen.txt renamed to test/test_cstgen/.snapshots/test_treegen.txt

Lines changed: 74 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/test_cstgen/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)