Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
7c2d082cf4
|
|||
1ba9934438
|
@ -8,7 +8,7 @@ flake8:
|
||||
image: python:3-alpine
|
||||
before_script:
|
||||
- pip install flake8 --no-cache-dir
|
||||
script: flake8 main.py
|
||||
script: flake8 main.py main_test.py
|
||||
allow_failure: true
|
||||
|
||||
|
||||
@ -17,11 +17,13 @@ pylint:
|
||||
image: python:3-alpine
|
||||
before_script:
|
||||
- pip install pylint --no-cache-dir
|
||||
script: pylint main.py
|
||||
script: pylint main.py main_test.py
|
||||
allow_failure: true
|
||||
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: python:3-alpine
|
||||
script: pytest --show-locals .
|
||||
before_script:
|
||||
- pip install pytest --no-cache-dir
|
||||
script: pytest --showlocals .
|
||||
|
3
main.py
3
main.py
@ -28,6 +28,9 @@ def main():
|
||||
|
||||
|
||||
def commande(name: str, *args):
|
||||
"""
|
||||
Exécute la commande `name` avec les arguments donnés.
|
||||
"""
|
||||
return globals()[name](*args)
|
||||
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
Exécution des tests du script.
|
||||
"""
|
||||
|
||||
import unittest
|
||||
|
||||
import main
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user