File tree Expand file tree Collapse file tree 4 files changed +77
-3
lines changed
Expand file tree Collapse file tree 4 files changed +77
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Test Site Modules and OS Path
2+
3+ on :
4+ push :
5+ branches : [ main, master, develop ]
6+ pull_request :
7+ branches : [ main, master, develop ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v3
16+
17+ - name : Set up Python
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : ' 3.11'
21+
22+ - name : Install dependencies
23+ run : |
24+ python -m pip install --upgrade pip
25+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26+
27+ - name : Run loadSearchApi test
28+ run : |
29+ PYTHONPATH=$PYTHONPATH:$(pwd) python -m Test.Util.loadSearchApi
30+
31+ - name : Run osPath test
32+ run : |
33+ PYTHONPATH=$PYTHONPATH:$(pwd) python -m Test.Util.osPath
Original file line number Diff line number Diff line change 11<p align =" center " >
2- <img src =" https://i.ibb.co/v6RnT0wY/s2.jpg " alt =" Project Logo " width =" 700 " />
2+ <img src =" https://i.ibb.co/v6RnT0wY/s2.jpg " alt =" Project Logo " width =" 600 " />
33</p >
44
55<p align =" center " >
3232# 📋 Table of Contents
3333
3434- 🔄 [ Update Domains] ( #update-domains )
35+ - 🌐 [ Available Sites] ( https://arrowar.github.io/StreamingDirectory/ )
3536- 🛠️ [ Installation] ( #installation )
3637 - 📦 [ PyPI Installation] ( #1-pypi-installation )
3738 - 🔄 [ Automatic Installation] ( #2-automatic-installation )
7273 <a href =" https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux_previous " >
7374 <img src="https://img.shields.io/badge/-Linux Previous-gray.svg?style=for-the-badge&logo=linux" alt="Linux Previous">
7475 </a >
76+ <a href =" https://github.com/Arrowar/StreamingCommunity/releases " >
77+ <img src="https://img.shields.io/badge/-All Versions-lightgrey.svg?style=for-the-badge&logo=github" alt="All Versions">
78+ </a >
7579</p >
7680
7781## 1. PyPI Installation
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ def initialize():
143143 sys .exit (0 )
144144
145145 # Trending tmbd
146- """ if SHOW_TRENDING:
146+ if SHOW_TRENDING :
147147 print ()
148148 tmdb .display_trending_films ()
149149 tmdb .display_trending_tv_shows ()
@@ -152,7 +152,7 @@ def initialize():
152152 try :
153153 git_update ()
154154 except :
155- console.log("[red]Error with loading github.")"""
155+ console .log ("[red]Error with loading github." )
156156
157157def restart_script ():
158158 """Riavvia lo script con gli stessi argomenti della riga di comando."""
Original file line number Diff line number Diff line change 1+ # 22.03.25
2+
3+ # Fix import
4+ import sys
5+ import os
6+ src_path = os .path .abspath (os .path .join (os .path .dirname (__file__ ), '..' , '..' ))
7+ sys .path .append (src_path )
8+
9+
10+ # Import
11+ import unittest
12+ import logging
13+ from StreamingCommunity .global_search import load_search_functions
14+
15+ class TestLoadSearchFunctions (unittest .TestCase ):
16+ def test_load_search_functions_no_exceptions (self ):
17+ try :
18+ logging .basicConfig (level = logging .INFO )
19+
20+ # Call the function to be tested
21+ loaded_functions = load_search_functions ()
22+
23+ # Verify that at least some modules were loaded
24+ self .assertTrue (len (loaded_functions ) > 0 , "No modules were loaded" )
25+
26+ # Print successfully loaded modules
27+ print ("\n Successfully loaded modules:" )
28+ for module_name , (_ , use_for ) in loaded_functions .items ():
29+ print (f"- { module_name } (type: { use_for } )" )
30+
31+ print (f"\n Total modules loaded: { len (loaded_functions )} " )
32+
33+ except Exception as e :
34+ self .fail (f"Error during module loading: { str (e )} " )
35+
36+ if __name__ == '__main__' :
37+ unittest .main ()
You can’t perform that action at this time.
0 commit comments