diff --git a/tests/test_backend_capabilities.py b/tests/test_backend_capabilities.py index 44e8b629..d381e692 100644 --- a/tests/test_backend_capabilities.py +++ b/tests/test_backend_capabilities.py @@ -178,7 +178,7 @@ def test_baserobot_module_has_no_pyplot_import(self): "robot", "BaseRobot.py", ) - with open(os.path.normpath(base_robot_path)) as f: + with open(os.path.normpath(base_robot_path), encoding="utf-8") as f: source = f.read() tree = ast.parse(source) @@ -231,7 +231,7 @@ def test_baserobot_module_no_matplotlib_top_level(self): "BaseRobot.py", ) ) - with open(base_robot_path) as f: + with open(base_robot_path, encoding="utf-8") as f: source = f.read() tree = ast.parse(source) @@ -257,7 +257,7 @@ def test_websockets_pin_relaxed(self): toml_path = os.path.normpath( os.path.join(os.path.dirname(__file__), "..", "pyproject.toml") ) - with open(toml_path) as f: + with open(toml_path, encoding="utf-8") as f: content = f.read() self.assertNotIn( "websockets<11",