Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python-api tests #1027

Closed
wants to merge 4 commits into from
Closed

Python-api tests #1027

wants to merge 4 commits into from

Conversation

Kmanfi
Copy link

@Kmanfi Kmanfi commented May 22, 2019

My motivation: Tests would work also as a reference how to use Yosys with the api.
Here is some initial work for testing python-api. One contains simple sanity tests. Another test is implementation of JSON writer by using python-api. Currently JSON writer is wip state but can make output that matches with fixed reference JSON. Goal is to make it match with Yosys JSON output.
There are lines marked with TODO: = need some attention like one already mentioned #1020 and #995
I tried to add C code behind #ifdef WITH_PYTHON but somehow it's not working. Any help is appreciated.
Found that backticks mentioned #1029 disturbed compile flags and WITH_PYHTON. Proposed fix for this in PR #1030

Kaj Tuomi added 3 commits May 22, 2019 18:01
Note: There are tests marked as skip.
Can now traverse connections_
python3 -m unittest discover
Ran 4 tests in 0.014s

OK (skipped=2)
Don’t bring nullptr checks to Python side. Use is_wire() for SigBits. Tried to ifdef code behind #ifdef WITH_PYTHON, it doesn’t work.
python3 -m unittest test_json test_bindings
Ran 6 tests in 0.029s
OK (skipped=2)
@Kmanfi
Copy link
Author

Kmanfi commented May 24, 2019

Let's put this PR on hold until I have explored pybind11.

@Kmanfi Kmanfi closed this May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant