Closed
Bug 1284469
Opened 8 years ago
Closed 8 years ago
Update python ftl parser to latest AST, tests
Categories
(L20n :: Python Library, defect)
L20n
Python Library
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Pike, Assigned: Pike)
References
Details
Attachments
(1 file)
The FTL part of python-l20n doesn't work with the latest version of the l20n-syntax-fixtures, notably, https://github.com/l20n/l20n-syntax-fixtures/commit/32535587f693b1f7bfd9ea4dfa2484487c308609 hasn't been ported. Also, the tests only run for zibi right now.
Assignee | ||
Comment 1•8 years ago
|
||
I've taken a pretty wild stab at refactoring the tests: There's now a single tests/test_format.py. That dynamically generates a class description based on the ftl fixtures, which is used as __metaclass__ for both the Parser and Serializer tests. The serializer explicitly skips the error tests. python -m unittest discover runs all tests on this branch. python -m unittest python -m unittest tests.test_format.L20nSerializerTestCase.test_02_multiline01 also works, when you hit a snag in a particular test. I've added the fixtures as git remote, but not the latest revision. I've also cut some lol files that were still around, not sure they're good for anything anymore? Given the size of the changes, feel free to hammer me. And yes, I could have added a better comment on the meta class :-/
Attachment #8768000 -
Flags: review?(gandalf)
Comment 2•8 years ago
|
||
Comment on attachment 8768000 [details] [review] just dealing with the running locally for now r+
Attachment #8768000 -
Flags: review?(gandalf) → review+
Comment 3•8 years ago
|
||
https://github.com/l20n/python-l20n/commit/71b53ec7eb165d6ca2f65d68269f2deca87b780d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Assignee: nobody → l10n
You need to log in
before you can comment on or make changes to this bug.
Description
•