Skip to content

Commit

Permalink
unskip few fork tests that already work
Browse files Browse the repository at this point in the history
  • Loading branch information
hyzhak committed Feb 19, 2017
1 parent f2719cc commit bec7934
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
2 changes: 1 addition & 1 deletion botstory/ast/callable_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def game_over(ctx):


@pytest.mark.asyncio
@pytest.mark.skip
@pytest.mark.skip('recursion')
async def test_async_end_of_story():
game_result = SimpleTrigger()

Expand Down
28 changes: 7 additions & 21 deletions botstory/ast/forking_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,8 @@ def next_room_2_2(ctx):
assert visited_rooms.value == 3


# TODO: fix switch
@pytest.mark.asyncio
@pytest.mark.skip
async def test_one_sync_switch_inside_of_another_sync_switch_alt_0():
async def test_one_sync_switch_inside_of_another_sync_switch_with_failed_switch():
exit_trigger = SimpleTrigger()
wrong_way = SimpleTrigger()

Expand Down Expand Up @@ -293,24 +291,20 @@ def next_room_2(ctx):

await say_pure_text('enter')
# should fail switch next_room_1_1 and drop to room_1_2
# and should be catched by alt_labyrinth
# and should not be cought by alt_labyrinth

# but seems something wrong with processor right now
await say_pure_text('right-way')

assert not wrong_way.is_triggered
assert exit_trigger.is_triggered


# TODO: simplify syntax
@pytest.mark.asyncio
@pytest.mark.skip
async def test_simplify_syntax_0():
async def test_simplify_syntax_wait_for_any_text():
left_trigger = SimpleTrigger()
right_trigger = SimpleTrigger()

with answer.Talk() as talk:
say_pure_text = talk(answer.pure_text)
story = talk.story

@story.on('enter')
Expand All @@ -332,17 +326,15 @@ def right_room():
def right_room_passed(ctx):
return right_trigger.passed()

await say_pure_text('enter')
await say_pure_text('right')
await talk.pure_text('enter')
await talk.pure_text('right')

assert not left_trigger.is_triggered
assert right_trigger.is_triggered


# TODO: simplify syntax
@pytest.mark.asyncio
@pytest.mark.skip
async def test_simplify_syntax_1():
async def test_simplify_syntax_for_case_matching():
left_trigger = SimpleTrigger()
right_trigger = SimpleTrigger()

Expand All @@ -355,14 +347,12 @@ def labyrinth():
def enter(ctx):
return [text.Any()]

# TODO: !!!!!!!!!!!
@story.case('left')
def left_room():
@story.part()
def left_room_passed(ctx):
return left_trigger.passed()

# TODO: !!!!!!!!!!!
@story.case('right')
def right_room():
@story.part()
Expand All @@ -376,10 +366,8 @@ def right_room_passed(ctx):
assert right_trigger.is_triggered


# TODO: simplify syntax
@pytest.mark.asyncio
@pytest.mark.skip
async def test_simplify_syntax_2():
async def test_simplify_syntax_case_matches_previous_returned_value():
left_trigger = SimpleTrigger()
right_trigger = SimpleTrigger()

Expand All @@ -390,7 +378,6 @@ async def test_simplify_syntax_2():
def labyrinth():
@story.part()
def enter(ctx):
# TODO: !!!!!!!!!!!
return 'right'

@story.case('left')
Expand All @@ -413,7 +400,6 @@ def right_room_passed(ctx):

# TODO: simplify syntax
@pytest.mark.asyncio
@pytest.mark.skip
async def test_warn_on_incorrect_syntax_user_forgot_add_switch_value():
left_trigger = SimpleTrigger()
right_trigger = SimpleTrigger()
Expand Down

0 comments on commit bec7934

Please sign in to comment.