Skip to content

Commit

Permalink
control test
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel authored and Samuel committed Feb 13, 2024
1 parent 5ea602c commit 333e077
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/control_tests.yaml
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
21 changes: 21 additions & 0 deletions .github/workflows/file_test.py
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'

0 comments on commit 333e077

Please sign in to comment.