Skip to content

Test: flask duplicate route is now a ValueError - #6380

Open
black-sliver wants to merge 1 commit into
ArchipelagoMW:mainfrom
black-sliver:fix/test-flask-duplicate-route
Open

Test: flask duplicate route is now a ValueError#6380
black-sliver wants to merge 1 commit into
ArchipelagoMW:mainfrom
black-sliver:fix/test-flask-duplicate-route

Conversation

@black-sliver

@black-sliver black-sliver commented Aug 6, 2026

Copy link
Copy Markdown
Member

What is this fixing or adding?

Sadly our WebHostLib is a bit of a mess and needs a work-around in tests.

Flask changed this from an assertion to a ValueError at some point, so we need to update the TestBase to also detect the ValueError.

How was this tested?

#6379 fails without this because of the order the tests are instantiated/run in.

@black-sliver
black-sliver marked this pull request as ready for review August 6, 2026 08:43
@github-actions github-actions Bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Aug 6, 2026
@duckboycool duckboycool added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Aug 7, 2026

@Jouramie Jouramie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into those tests many times. Thanks for looking into it and finding the solution!

Did not test the tests, code LGTM.

Comment thread test/webhost/__init__.py
})
try:
cls.app = get_app()
except AssertionError as e:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the old flask version still used? Do we still need to expect AssertionError?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, people that never run WebHost locally (to trigger an update), may still run tests locally with an old version of flask.

@Jouramie Jouramie added the affects: webhost Issues/PRs that touch webhost and may need additional validation. label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: webhost Issues/PRs that touch webhost and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants