Skip to content

Conversation

@ntno
Copy link
Owner

@ntno ntno commented Jan 10, 2023

Description

  • automated tests #13
  • adds pytests which demonstrate how to unit test jinja2 macro (can be improved, but this is a start)
  • fixed tile.j2 macro to pass added tests

Fixes

  • img_alt defaults to empty string instead of no alt attribute
  • width and height attributes default to no attribute instead of "auto" ("auto" is an invalid value for img width/height)

References

pytidylib
jinja2 test config: https://github.com/pallets/jinja/blob/main/tests/conftest.py
jinja2 tests: https://github.com/pallets/jinja/blob/main/tests/test_tests.py
pytidylib missing library issue
^having problems running pytidylib on windows, possibly related to something similar

Testing

make tox
review doc site with make serve-local-theme

  • [x ] This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in mkdocs-terminal/documentation
  • All active GitHub checks for tests, formatting, and security are passing

@ntno ntno merged commit b5af732 into main Jan 11, 2023
@ntno ntno deleted the simple-tests branch January 11, 2023 19:08
@ntno ntno mentioned this pull request Jan 11, 2023
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.

2 participants