From 40bfda38a53bcc8456519accc800eb4893e9b08f Mon Sep 17 00:00:00 2001 From: LWJ-Nicholas Date: Mon, 15 Jan 2024 17:18:09 +0800 Subject: [PATCH 1/3] fix: CI Workflow --- .github/workflows/CI.yml | 3 ++- requirements.txt | 4 ++-- test.py | 0 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 test.py diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dcb4efb..e3c8199 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -39,7 +39,8 @@ jobs: Workflow name - `${{ github.workflow }}` Job - `${{ github.job }}` status - `${{ job.status }}` - assignees: lowkh + assignees: LWJ-Nicholas + approvers: HanisahMusrin diff --git a/requirements.txt b/requirements.txt index 56dd238..9318df6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,5 @@ pytest-cov Flask Jinja2 passlib -flask-login -flask-sqlalchemy \ No newline at end of file +flask_login +flask_sqlalchemy \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 0000000..e69de29 From b0f0de24849a1db1b84d104287d4bfb05a722b40 Mon Sep 17 00:00:00 2001 From: LWJ-Nicholas Date: Mon, 15 Jan 2024 17:20:23 +0800 Subject: [PATCH 2/3] Commit to trigger CI workflow --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index a50e760..7a1d895 100644 --- a/main.py +++ b/main.py @@ -3,4 +3,5 @@ app = create_app() if __name__ == '__main__': - app.run(debug=True) \ No newline at end of file + app.run(debug=True) + print("Hello World") \ No newline at end of file From 91b15838144864e2336f7bbb060634cd8a405c12 Mon Sep 17 00:00:00 2001 From: LWJ-Nicholas Date: Mon, 15 Jan 2024 17:28:42 +0800 Subject: [PATCH 3/3] fix: Added test.py file for unit testing --- main.py | 3 +-- test.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 7a1d895..a50e760 100644 --- a/main.py +++ b/main.py @@ -3,5 +3,4 @@ app = create_app() if __name__ == '__main__': - app.run(debug=True) - print("Hello World") \ No newline at end of file + app.run(debug=True) \ No newline at end of file diff --git a/test.py b/test.py index e69de29..3e8d697 100644 --- a/test.py +++ b/test.py @@ -0,0 +1,13 @@ +import pytest + +# content of test_sysexit.py +import pytest + + +def f(): + raise SystemExit(1) + + +def test_mytest(): + with pytest.raises(SystemExit): + f() \ No newline at end of file