From c96781a7957e3887f55cd669002b333539c834c3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 21 Apr 2022 20:40:23 -1000 Subject: [PATCH] Prevent plumbum from causing the testsuite to fail (#70400) --- tests/components/habitica/conftest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/components/habitica/conftest.py diff --git a/tests/components/habitica/conftest.py b/tests/components/habitica/conftest.py new file mode 100644 index 00000000000..2401397be26 --- /dev/null +++ b/tests/components/habitica/conftest.py @@ -0,0 +1,15 @@ +"""Tests for the habitica component.""" + +from unittest.mock import patch + +import pytest + + +@pytest.fixture(autouse=True) +def disable_plumbum(): + """Disable plumbum in tests as it can cause the test suite to fail. + + plumbum can leave behind PlumbumTimeoutThreads + """ + with patch("plumbum.local"), patch("plumbum.colors"): + yield