]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: use the flakey marker in random weight test, instead of a comment
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Jul 2022 01:49:35 +0000 (02:49 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Jul 2022 01:50:13 +0000 (02:50 +0100)
tests/test_dns_srv.py

index 5a7fa2d18b51909454cecb1de6fc9bc7f62c5c4e..57fce99c3209f3fa3176be4dd11a626cdabae755 100644 (file)
@@ -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