コード例 #1
0
def test_light_choice_stop_red():
    assert traffic_light_choice("stopped", "red") == "stop"
コード例 #2
0
def test_light_choice_stop_yellow():
    assert traffic_light_choice("stopped", "yellow") == "stop"
コード例 #3
0
def test_light_choice_moving_yellow():
    assert traffic_light_choice("moving", "yellow") == "stop"
コード例 #4
0
def test_light_choice_moving_green():
    assert traffic_light_choice("moving", "green") == "go"
コード例 #5
0
def test_light_choice_moving_red():
    assert traffic_light_choice('moving', 'red') == 'stop'
コード例 #6
0
def test_light_choice_moving_red():
    assert traffic_light_choice("moving", "red") == "stop"
コード例 #7
0
def test_light_choice_stop_yellow():
    assert traffic_light_choice('stop', 'yellow') == 'stop'
コード例 #8
0
def test_light_choice_stopped_yellow():
    assert operations.traffic_light_choice("stopped", "yellow") == "stop"
コード例 #9
0
def test_light_choice_moving_green():
    assert traffic_light_choice('moving', 'green') == 'go'
コード例 #10
0
def test_light_choice_stop_red():
    assert traffic_light_choice('stop', 'red') == 'stop'
コード例 #11
0
def test_light_choice_moving_yellow():
    assert traffic_light_choice('moving', 'yellow') == 'stop'
コード例 #12
0
def test_multiple_at_once():  # This method is not advised
    assert operations.traffic_light_choice("stopped", "yellow") == "stop"
    assert operations.traffic_light_choice("stopped", "green") == "go"
    assert operations.traffic_light_choice("stopped", "green") == "break me"
コード例 #13
0
def test_light_choice_stopped_green():
    assert operations.traffic_light_choice("stopped", "green") == "go"
コード例 #14
0
def test_light_choice_stop_green():
    assert traffic_light_choice("stopped", "green") == "go"
コード例 #15
0
def test_light_choice_stop_green():
    assert traffic_light_choice('stop', 'green') == 'go'
コード例 #16
0
def test_light_choice():
    assert traffic_light_choice("moving", "red") == "stop"
    assert traffic_light_choice("moving", "yellow") == "go"
    assert traffic_light_choice("moving", "yellow") == "stop"
コード例 #17
0
def test_light_choice_stopped_red():
    assert operations.traffic_light_choice("stopped", "red") == "stop"