illustrations: mise à jour

This commit is contained in:
Raito Bezarius 2020-06-30 14:43:17 +02:00
parent 7cbe49d362
commit d9f313da55
4 changed files with 35 additions and 1 deletions

View file

@ -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

View file

@ -8,6 +8,7 @@ def encode(input_string):
count = 1
prev = ''
lst = []
if not input_string:
return ([], 0)

View file

@ -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.