Skip to content

Commit

Permalink
Updated Pipeline To Support Multi-OS & Added Support for PyPI Release
Browse files Browse the repository at this point in the history
  • Loading branch information
coldsofttech committed Apr 13, 2024
1 parent 415f391 commit e093ba1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
-d '{"draft": false}' \
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}"
# release_windows:
# name: Release for Windows
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/test_aboutui.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import tkinter as tk
import unittest
from unittest.mock import patch
Expand All @@ -11,6 +12,10 @@ class TestAboutUI(unittest.TestCase):
"""Unit test cases for AboutUI"""

def setUp(self):
if os.environ.get('DISPLAY', '') == '':
print('No display found. Using: 0.0')
os.environ.__setitem__('DISPLAY', ':0.0')

self.root = tk.Tk()

def tearDown(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_downloadthread.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class TestDownloadThread(unittest.TestCase):
"""Unit test cases for DownloadThread class."""

def setUp(self):
if os.environ.get('DISPLAY', '') == '':
print('No display found. Using: 0.0')
os.environ.__setitem__('DISPLAY', ':0.0')

self.input_url = 'https://raw.githubusercontent.com/coldsofttech/pym3u8downloader/main/tests/files/index.m3u8'
self.output_file = 'video.mp4'
self.root = tk.Tk()
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/test_m3u8downloaderui.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import tkinter as tk
import unittest
from unittest.mock import patch, MagicMock
Expand All @@ -11,6 +12,10 @@ class TestM3U8DownloaderUI(unittest.TestCase):
"""Unit test cases for M3U8DownloaderUI"""

def setUp(self):
if os.environ.get('DISPLAY', '') == '':
print('No display found. Using: 0.0')
os.environ.__setitem__('DISPLAY', ':0.0')

self.root = tk.Tk()
self.source = M3U8DownloaderUI(self.root)
self.input_url = 'https://raw.githubusercontent.com/coldsofttech/pym3u8downloader/main/tests/files/index.m3u8'
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/test_stdoutredirector.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import tkinter as tk
import unittest

Expand All @@ -10,6 +11,10 @@ class TestStdoutRedirector(unittest.TestCase):
"""Unit test cases for StdoutRedirector"""

def setUp(self):
if os.environ.get('DISPLAY', '') == '':
print('No display found. Using: 0.0')
os.environ.__setitem__('DISPLAY', ':0.0')

self.root = tk.Tk()
self.text_variable = tk.StringVar()
self.stdout_redirector = StdoutRedirector(self.text_variable)
Expand Down

0 comments on commit e093ba1

Please sign in to comment.