Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amilcarlucas committed Jan 1, 2025
1 parent 0a81c76 commit 47a987f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,19 @@ jobs:
pip install build
pip install -U .
- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y xvfb
- name: Set PYTHONPATH
run: |
echo "$PYTHONPATH"
echo "PYTHONPATH=/home/runner/work/MethodicConfigurator/ardupilot_methodic_configurator/ardupilot_methodic_configurator" >> $GITHUB_ENV
echo "$PYTHONPATH"
- name: Test with unittest
run: |
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x16 &
python -m unittest discover -s ./unittests -p '*_test.py'
- name: Unittest coverage report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
SPDX-License-Identifier: GPL-3.0-or-later
"""

# import os
import tkinter as tk
import unittest
from tkinter import ttk
Expand All @@ -23,11 +22,6 @@ 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)
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

0 comments on commit 47a987f

Please sign in to comment.