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

Missing tests #32

Open
2 of 3 tasks
nerdoc opened this issue Oct 2, 2022 · 5 comments
Open
2 of 3 tasks

Missing tests #32

nerdoc opened this issue Oct 2, 2022 · 5 comments

Comments

@nerdoc
Copy link
Collaborator

nerdoc commented Oct 2, 2022

There are no tests in tetra.

If you tell me what testing framework you prefer (Django unit tests, pytest/pytest-django, etc.) I can help at least with adding some backend tests, , e.g. using the demo site.

  • test framework setup
  • (at least some) backend tests
  • (at least some) frontend tests
@samwillis
Copy link
Collaborator

Ha, yes. Thats a little embarrassing really...

PyTest (with Playwright for integration) are my preferred tools.

Something I want to do I provide a simple way for devs to setup PyTest/Playwright for their own Tetra components.

@nerdoc
Copy link
Collaborator Author

nerdoc commented Oct 3, 2022

Do you want to include tests into the demosite, as there already is a django project to use for tests? I always had problems setting up pytest "standalone", without a full django project (just with those runtests.py, conftest.py etc).

@bittner
Copy link

bittner commented Sep 19, 2023

@nerdoc Did you ever start with the tests? Did you also plan to add a CI setup?

If it helps, I could add something like this as a test infrastructure:

  • Packaging setup all in pyproject.toml (replacing setup.py)
  • Test setup with Tox (linting and test execution against all supported Python versions in tox.ini)
  • CI with GHA (using the Tox environments to run linting and tests)

The setup would be similar to what you can find in this Django project example, but with GHA for GitHub.

Interested?

@nerdoc
Copy link
Collaborator Author

nerdoc commented Sep 20, 2023

HM, no. As tetra seems to be dead (at least Sam seems to have no time for maintaining it), I switched to using HTMX...

@nerdoc
Copy link
Collaborator Author

nerdoc commented Apr 9, 2024

@bittner Wind is changing again ;-)
As I took over the development of tetra, I added basic tests, at least for some of the blocks and backend things, see in the "tetra-package" branch (soon to be merged).

I never used tox, but the tests are run with pytest ATM. CI in GH is set up and working as well.

I don't know well how to test the frontend parts. I've never used a Js frontent test engine. MochaJs (X,=nodejs), Jest(X, more for React etc), Jasmine(BDD!), Karma(needs Browser?), Cypress(component testing!!, supported by PyCharm IDE), Selenium (uuuaaargh...)

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

No branches or pull requests

3 participants