test failures in 0.7.2; test_simple, test_empty_production under py3[3-4]
- 主要言語
- Python
- スター
- 391
- フォーク
- 62
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
from the source, with system python set to Python 3.3.5;
rply-0.7.2 $ py.test tests/
yields
``` python
======================== test session starts
========================
platform linux -- Python 3.3.5 -- py-1.4.20 -- pytest-2.5.2
collected 35 items / 1 skipped
tests/test_both.py .
tests/test_lexer.py ...
tests/test_parser.py ..........
tests/test_parsergenerator.py FF.......
tests/test_tokens.py ...
tests/test_utils.py .....
tests/test_warnings.py ....
========================== FAILURES
==========================
_________________________ TestParserGenerator.test_simple
_________________________
self =
def test_simple(self):
pg = ParserGenerator(["VALUE"])
@pg.production("main : VALUE")
def main(p):
return p[0]
parser = pg.build()
> assert parser.lr_table.lr_action == [
{"VALUE": 2},
{"$end": 0},
{"$end": -1},
]
E assert [{'VALUE': 1}..., {'$end': 0}] == [{'VALUE': 2},... {'$end': -1}]
E At index 0 diff: {'VALUE': 1} != {'VALUE': 2}
tests/test_parsergenerator.py:19: AssertionError
______________________ TestParserGenerator.test_empty_production
______________________
self =
def test_empty_production(self):
pg = ParserGenerator(["VALUE"])
@pg.production("main : values")
def main(p):
return p[0]
@pg.production("values : VALUE values")
def values_value(p):
return [p[0]] + p[1]
@pg.production("values :")
def values_empty(p):
return []
parser = pg.build()
> assert parser.lr_table.lr_action == [
{"$end": -3, "VALUE": 3},
{"$end": 0},
{"$end": -1},
{"$end": -3, "VALUE": 3},
{"$end": -2},
]
E assert [{'$end': -3,... {'$end': -2}] == [{'$end': -3, ... {'$end': -2}]
E At index 0 diff: {'VALUE': 1, '$end': -3} != {'VALUE': 3, '$end': -3}
```
with system Python 3.4.0
``` python
tests/test_parsergenerator.py FF.......
__ TestParserGenerator.test_simple __
```
as for Python 3.3.5
``` python
__ TestParserGenerator.test_empty_production __
> assert parser.lr_table.lr_action == [
{"$end": -3, "VALUE": 3},
{"$end": 0},
{"$end": -1},
{"$end": -3, "VALUE": 3},
{"$end": -2},
]
E assert [{'$end': -3,... {'$end': -2}] == [{'$end': -3, ... {'$end': -2}]
E At index 0 diff: {'VALUE': 2, '$end': -3} != {'$end': -3, 'VALUE': 3}
tests/test_parsergenerator.py:41: AssertionError
```
Can you replicate? py3.2 passes fine. These may be python minor version sensitive.
Do you require anything further?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。