Skip to content

Commit

Permalink
fix testing BP
Browse files Browse the repository at this point in the history
fbarth committed Nov 8, 2023
1 parent a834ec7 commit dc819a1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/test_poda_BP.py
Original file line number Diff line number Diff line change
@@ -82,12 +82,18 @@ def test_bp_aspiradorpo_without_pruning():
def test_bp_aspiradorpo_father_son_pruning():
state = AspiradorPo('','ESQ','SUJO','SUJO')
algorithm = BuscaProfundidade()
result = algorithm.search(state, 5, pruning='father-son')
assert result.show_path() == ' ; limpar ; dir ; limpar ; dir ; esq'
assert result.g == 5
result = algorithm.search(state, 10, pruning='father-son')
assert result.show_path() == ' ; limpar ; dir ; limpar ; esq'
assert result.g == 4

def test_bp_aspiradorpo_general_pruning():
state = AspiradorPo('', 'ESQ', 'SUJO', 'SUJO')
algorithm = BuscaProfundidade()
result = algorithm.search(state, 5, pruning='general')
assert result is None
assert result.show_path() == ' ; limpar ; dir ; limpar ; esq'

def test_bp_aspiradorpo_without_pruning_10():
state = AspiradorPo('', 'ESQ', 'SUJO', 'SUJO')
algorithm = BuscaProfundidade()
result = algorithm.search(state, 10, pruning='without')
assert result.show_path() == ' ; limpar ; limpar ; limpar ; limpar ; limpar ; limpar ; limpar ; dir ; limpar ; esq'

0 comments on commit dc819a1

Please sign in to comment.