Fix no-ops with the @online_only unit test decorator.
Review Request #14940 — Created March 18, 2026 and updated — Latest diff uploaded
In 2021, the
@online_onlydecorator was rewritten to use
@simple_decorator, but the result was a function that performed no-ops
when online. Instead of calling the test function with the provided
arguments, it just returned the first argument as-is (which was the
selfargument to the unit test class). This got ignored, resulting in
nothing happening when the test was run.This did unveil that one test (Mercurial's HTTPS tests) were no longer
passing. This was due to the repository having bot protection deployed,
which meant we were getting HTTP 200 results that weren't actually the
file contents. We've switched to Mozilla's HG server for our test, which
currently has no bot protection.
Unit tests pass.