-
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.
- Loading branch information
Samuel
authored and
Samuel
committed
Feb 13, 2024
1 parent
5ea602c
commit 333e077
Showing
2 changed files
with
47 additions
and
0 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,26 @@ | ||
name: Control Push | ||
on: push | ||
jobs: | ||
qa: | ||
name: Check tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout on master | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install pytest and flake8 | ||
run: | | ||
pip install pytest | ||
pip install flake8 | ||
- name: Run tests | ||
run: | | ||
pytest | ||
- name: Run flake8 | ||
uses: py-actions/flake8@v2 |
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,21 @@ | ||
import pytest | ||
|
||
def test_calc_addition(): | ||
# Fonction test du résultat de 2+4 | ||
output = 2+4 | ||
assert output == 6 | ||
|
||
def test_calc_substraction(): | ||
# Fonction test du résultat de 2-4 | ||
output = 2-4 | ||
assert output == -2 | ||
|
||
def test_calc_multiply(): | ||
# Fonction test du résultat de 2*4 | ||
output = 2*4 | ||
assert output == 8 | ||
|
||
def test_coucou(): | ||
# Fonction test si la résultat renvoie 'hello' | ||
output='hello' | ||
assert output == 'hello' |