mirror of
https://github.com/newtype256/esgi-devops.git
synced 2025-06-04 06:26:26 +02:00
illustrations: mise à jour
This commit is contained in:
parent
7cbe49d362
commit
d9f313da55
4 changed files with 35 additions and 1 deletions
|
@ -8,7 +8,7 @@ class UnixFS:
|
|||
|
||||
# Sans intégration
|
||||
def test_monkeypatche(mocker):
|
||||
mocker.patch('os.remove')
|
||||
mocker.patch('os.remove') # Se renseigner sur les mocks dans les tests
|
||||
UnixFS.rm('contrôle complet')
|
||||
os.remove.assert_called_once_with('contrôle complet')
|
||||
|
||||
|
@ -22,4 +22,5 @@ def test_db_with_db():
|
|||
UnixFS.rm(fp.name)
|
||||
# Exercice: assert que le fichier a été supprimé.
|
||||
# assert not os.access(fp.name)?
|
||||
# Regarder os.path aussi.
|
||||
# https://docs.python.org/fr/3/library/os.html
|
||||
|
|
|
@ -8,6 +8,7 @@ def encode(input_string):
|
|||
count = 1
|
||||
prev = ''
|
||||
lst = []
|
||||
|
||||
if not input_string:
|
||||
return ([], 0)
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ from hypothesis import given, assume
|
|||
from hypothesis.strategies import lists, permutations
|
||||
from collections import Counter, defaultdict
|
||||
|
||||
# Wikipedia: Paradoxe de Condorcet / Scrutin de Condorcet.
|
||||
# Ici, on va observer un paradoxe classique en théorie des votes juste en utilisant Hypothesis.
|
||||
# Imaginez, ici que vous fabriquez un algorithme de couplage, type APB/Admissions Parallèles/Parcoursup.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue