Blueprints get duplicate namespace prefixes in tests #521
Labels
Issue appropriate for: People up for a challenge 🤯
This issue probably will be challenging to tackle
Issue contains: Exploration & Design decisions 🧩
We don't know how this will be implemented yet
Issue contains: Some Python 🐍
This issue involves writing some Python code
Issue type: Bug 🐞
Something isn't working
I am initializing the app several times in my tests, and after upgrading to 0.23.0 I noticed that the tests have started to fail, with
procrastinate.exceptions.TaskNotFound
:I noticed when debugging the tests that my tasks had duplicated their prefixes:
I have a function scoped fixture that returns the app, which is created this way
So this gets called multiple times. It seems like the blueprint persists the name of the task, including the prefix.
Here's the blueprint:
I've been able to work around this by having a reset_blueprint fixture, that I'm using now:
I'm not sure if this is a bug, or something else but
importlib.reload
seems like a workaround.Sorry about no proper reproducer, let me if that's needed and I can try to set that up.
The text was updated successfully, but these errors were encountered: