From fa95f29fac2b6b8d2a3a8fd9ec8e02e8bb6ac991 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 15 Sep 2023 07:42:23 -0700 Subject: [PATCH] chore: make walk_through_apiary_test more resilient (#1859) * test * chore: make test less fragile --- tests/test_node.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_node.py b/tests/test_node.py index 2a28410f0..cf1d1b760 100644 --- a/tests/test_node.py +++ b/tests/test_node.py @@ -266,8 +266,10 @@ def test_walk_through_apiary(mock_subproc_popen): mock_subproc_popen.return_value = process_mock dirs = node.walk_through_apiary(FIXTURES / "node_apiary", "src/apis/**/*") assert not mock_subproc_popen.called - assert re.search("src/apis/admin", dirs[0]) - assert re.search("src/apis/docs", dirs[1]) + assert re.search( + "(?:% s)" % "|".join(["src/apis/admin", "src/apis/docs"]), + "(?:% s)" % "|".join(dirs), + ) assert len(dirs) == 2