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

speed up unit tests #1305

Merged
merged 1 commit into from
Apr 16, 2024
Merged

speed up unit tests #1305

merged 1 commit into from
Apr 16, 2024

Conversation

azmeuk
Copy link
Contributor

@azmeuk azmeuk commented Apr 16, 2024

With this PR the jinja templates are compiled once per test session instead of once per test, by using the jinja cache system and a pytest fixture.

On my machine, tests run in 19.50s instead of 27,84s.

https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.FileSystemBytecodeCache

The jinja templates are compiled once per test session instead of once
per test, using jinja cache system and a pytest fixture.

https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.FileSystemBytecodeCache
@almet
Copy link
Member

almet commented Apr 16, 2024

That's very nice :-) Thanks!

@zorun
Copy link
Collaborator

zorun commented Apr 16, 2024

Nice improvement, thanks!

@zorun zorun merged commit 3ac1bb8 into spiral-project:master Apr 16, 2024
21 checks passed
@azmeuk azmeuk deleted the jinja-caching branch April 16, 2024 21:21
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.

3 participants