From c7b8b80a4d5c9bd00ab8dd5484f5fa91bd3795cf Mon Sep 17 00:00:00 2001 From: Thorsten Date: Mon, 29 Apr 2024 17:11:16 +0200 Subject: [PATCH] Fix tests for ARM and x86 reading files of previous tests --- .github/workflows/ci.yml | 18 ++++++++++++++++-- tests/test_ishelper_linux_x64.py | 3 +++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbed9038..9f36a824 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,22 @@ jobs: continue-on-error: true - name: Start proxy server run: python -m proxy --threaded --hostname 127.0.0.1 --log-level DEBUG & - - name: Run unit tests - run: coverage run -m unittest discover + - name: Run unit tests for API + run: coverage run -m unittest tests/test_api.py + - name: Run unit tests for Android ARM + run: coverage run -m unittest tests/test_ishelper_android_arm.py + - name: Run unit tests for Linux ARM + run: coverage run -m unittest tests/test_ishelper_linux_arm.py + - name: Run unit tests for Linux x64 + run: coverage run -m unittest tests/test_ishelper_linux_x64.py + - name: Run unit tests for MacOS x64 + run: coverage run -m unittest tests/test_ishelper_macos_x64.py + - name: Run unit tests for Windows x64 + run: coverage run -m unittest tests/test_ishelper_windows_x64.py + - name: Run unit tests for proxy + run: coverage run -m unittest tests/test_proxy.py + - name: Run unit tests for utils + run: coverage run -m unittest tests/test_utils.py - name: Run addon using cli run: coverage run -a default.py - name: Upload code coverage to CodeCov diff --git a/tests/test_ishelper_linux_x64.py b/tests/test_ishelper_linux_x64.py index 5939ceef..349e12ce 100644 --- a/tests/test_ishelper_linux_x64.py +++ b/tests/test_ishelper_linux_x64.py @@ -7,6 +7,8 @@ from __future__ import absolute_import, division, print_function, unicode_literals import unittest import platform +from shutil import rmtree + import inputstreamhelper from test_utils import delete_cached @@ -20,6 +22,7 @@ class LinuxX64Tests(unittest.TestCase): def setUp(self): delete_cached() + rmtree(xbmcvfs.translatePath('special://home')) def test_check_inputstream_mpd(self): inputstreamhelper.system_os = lambda: 'Linux'