-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from newcleo-dev-team/012_test_framework
Created the test framework
- Loading branch information
Showing
5 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Test all scripts in tests/ and doc compilation | ||
name: main_actions | ||
|
||
on: push | ||
|
||
jobs: | ||
test_all_tests: | ||
runs-on: [ubuntu-latest] | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: sudo apt-get install python3-tk | ||
- run: pip install ttkthemes | ||
- run: pip install pandas | ||
- run: pip install matplotlib | ||
- run: python3 -m unittest tests/test_gui_window_basic.py -v | ||
|
||
test_documentation: | ||
if: contains( github.ref, 'master') | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: sudo apt-get install python3-sphinx | ||
- run: pip install sphinx-rtd-theme | ||
- run: pip install myst-parser | ||
- run: pip install sphinxcontrib-bibtex | ||
- run: make html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" | ||
Testing module for ``tugui`` | ||
""" | ||
import os | ||
import sys | ||
|
||
|
||
PROJECT_PATH = os.getcwd() | ||
SOURCE_PATH = os.path.join( | ||
PROJECT_PATH,"tugui" | ||
) | ||
sys.path.append(SOURCE_PATH) | ||
|
||
RESOURCES_PATH = os.path.join( | ||
SOURCE_PATH, 'resources' | ||
) | ||
sys.path.append(RESOURCES_PATH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os | ||
import sys | ||
from tkinter import TclError | ||
import unittest | ||
|
||
from tugui.main import TuPostProcessingGui | ||
|
||
class TestGUI(unittest.TestCase): | ||
""" | ||
""" | ||
|
||
def test_01_gui_building_no_exec(self): | ||
""" | ||
""" | ||
print("#-------------------------------------") | ||
print("'TuPostProcessingGui' tests started:") | ||
print("Checking initial setup...") | ||
# Instantiate the GUI class | ||
try: | ||
print(" -> test_gui_building_no_exec: ", end="") | ||
self.root = TuPostProcessingGui("GUI Window", 300, 150) | ||
except Exception as e: | ||
print("successful") | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main(verbosity=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters