Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
amilcarlucas committed Jan 1, 2025
1 parent 8856f5b commit 0a81c76
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
SPDX-License-Identifier: GPL-3.0-or-later
"""

import os
# import os
import tkinter as tk
import unittest
from tkinter import ttk
Expand All @@ -23,11 +23,11 @@ class TestDocumentationFrame(unittest.TestCase):
"""Test the DocumentationFrame class."""

def setUp(self) -> None:
if os.getenv("GITHUB_ACTIONS"):
os.environ["DISPLAY"] = ":99" # Set DISPLAY environment variable for headless mode
import subprocess

subprocess.run(["Xvfb", ":99", "-screen", "0", "1024x768x16"], check=False) # noqa: S603, S607
# if os.getenv("GITHUB_ACTIONS"):
# os.environ["DISPLAY"] = ":99" # Set DISPLAY environment variable for headless mode
# import subprocess
#
# subprocess.run(["Xvfb", ":99", "-screen", "0", "1024x768x16"], check=False)
self.root = tk.Tk()
self.local_filesystem = Mock()
self.local_filesystem.get_documentation_text_and_url.return_value = ("Sample blog text", "http://example.com/blog")
Expand Down Expand Up @@ -89,8 +89,6 @@ def test_update_documentation_labels(self, mock_show_tooltip, _mock_webbrowser_o
mock_show_tooltip.assert_any_call(self.doc_frame.documentation_labels["Forum Blog:"], "http://blog.url")
mock_show_tooltip.assert_any_call(self.doc_frame.documentation_labels["Wiki:"], "http://wiki.url")
mock_show_tooltip.assert_any_call(self.doc_frame.documentation_labels["External tool:"], "http://external_tool.url")
# mock_show_tooltip.assert_any_call(self.doc_frame.documentation_labels["Mandatory:"],
# "Documentation URL not available")


if __name__ == "__main__":
Expand Down

0 comments on commit 0a81c76

Please sign in to comment.