Skip to content

py2many test cases #59

@jayvdb

Description

@jayvdb

I am looking for a python to JS implementation to run within or alongside https://github.com/adsharma/py2many , and running pj on the tests in https://github.com/adsharma/py2many/tree/main/tests/cases I found some issues, that I thought worth sharing. See metapensiero/metapensiero.pj#61 for the same in an alternative project.

I initially tried with the PyPI release, and found it doesnt support AnnAssign very well. Using master works a bit better, but still fails https://github.com/adsharma/py2many/blob/main/tests/cases/rect.py with "Cannot convert AnnAssign nodes with no assignment!" due to using dataclasses.

Another set of tests fail due to no "Set", which is already raised as #24 .

https://github.com/adsharma/py2many/blob/main/tests/cases/exceptions.py is an interesting one -- most Python transpilers dont handle this, and pscript does quite well, except it doesnt detect the divide-by-zero, as this returns Infinity on JavaScript, not an exception.

Also a special mention, bitops.py works correctly, where most Python->JavaScript transpilers cant do this (and often wontfix it).

Other failures:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions