Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Run tests when PR is created
on:
issue_comment:
types: [created]
pull_request:
types: [opened,reopened]

jobs:
run-tests:
Expand All @@ -25,7 +27,7 @@ jobs:

- name: Install dependencies with apt get
run: |
sudo apt-get install -y libdbus-1-dev libdbus-glib-1-dev
sudo apt-get install -y libdbus-1-dev libdbus-glib-1-dev xvfb

- name: Install Pipenv
run: |
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ Run the tests:

In order to get test coverage, run the following command and then open `htmlcov/index.html`

coverage run -m unittest discover && coverage html
coverage run -m unittest discover && coverage html

test
5 changes: 5 additions & 0 deletions test/test_UILayoutHelper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import unittest
from unittest.mock import Mock, patch

Expand All @@ -8,6 +9,10 @@

class TestUILayoutHelper(unittest.TestCase):
def setUp(self):
if os.name != "nt" and os.getenv("GITHUB_ACTIONS"):
os.system('Xvfb :1 -screen 0 1600x1200x16 &')
os.environ["DISPLAY"] = ":1.0"

self.root = CTk()

config_manager = Mock()
Expand Down