You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it could be interesting to have a command-line test system for Brython (that could be integrated into the github CI/CD) working as follow :
a Python script reading a python file.
add a settrace() at the start, printing the value of local and global variables at the end of each executed lines (e.g. print(name, type(locals.name), locals.name)).
execute it in a new Python process.
transform it into JS and execute it in a new Deno process.
compare the output of both version.
This could enable to easily check Brython implementation against CPython on existing Python scripts.
This could be useful for unit tests :
reading the files of a directory, and splitting files by e.g. "# TEST: name", to then execute it with the test system.
run several existing python scripts (e.g. like TypeScript is doing, running the new Typescript version against the TOP100 TS projects).
This system won't be able to test DOM features, as Python doesn't have any.
But we could think of a way to integrate such tests. e.g. instead of executing in a new Python process, transforming it into JS with an old version of Brython, and compare both output.
This could also help people to check their part of their code before upgrading their Brython version.
What do you think ?
EDIT: maybe could also have a REPL version (?)
Cordially,
The text was updated successfully, but these errors were encountered:
Hi,
I was wondering if it could be interesting to have a command-line test system for Brython (that could be integrated into the github CI/CD) working as follow :
print(name, type(locals.name), locals.name)
).This could enable to easily check Brython implementation against CPython on existing Python scripts.
This could be useful for unit tests :
This system won't be able to test DOM features, as Python doesn't have any.
But we could think of a way to integrate such tests. e.g. instead of executing in a new Python process, transforming it into JS with an old version of Brython, and compare both output.
This could also help people to check their part of their code before upgrading their Brython version.
What do you think ?
EDIT: maybe could also have a REPL version (?)
Cordially,
The text was updated successfully, but these errors were encountered: