From: Daniele Varrazzo Date: Sun, 3 Jul 2022 01:49:35 +0000 (+0100) Subject: test: use the flakey marker in random weight test, instead of a comment X-Git-Tag: 3.1~54^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71305803cbb3f1dcd43e832cc156ddfdf24dc1d6;p=thirdparty%2Fpsycopg.git test: use the flakey marker in random weight test, instead of a comment --- diff --git a/tests/test_dns_srv.py b/tests/test_dns_srv.py index 5a7fa2d18..57fce99c3 100644 --- a/tests/test_dns_srv.py +++ b/tests/test_dns_srv.py @@ -43,13 +43,12 @@ samples_ok = [ ] +@pytest.mark.flakey("random weight order, might cause wrong order") @pytest.mark.parametrize("conninfo, want, env", samples_ok) def test_srv(conninfo, want, env, fake_srv, monkeypatch): if env: for k, v in env.items(): monkeypatch.setenv(k, v) - # Note: This test is flakey because weight order is random, although wrong - # order is unlikely. params = conninfo_to_dict(conninfo) params = psycopg._dns.resolve_srv(params) # type: ignore[attr-defined] assert conninfo_to_dict(want) == params