From 71305803cbb3f1dcd43e832cc156ddfdf24dc1d6 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 3 Jul 2022 02:49:35 +0100 Subject: [PATCH] test: use the flakey marker in random weight test, instead of a comment --- tests/test_dns_srv.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.47.3