Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in byte 89 longest state - there are north and south crolina #10

Closed
ghost opened this issue May 5, 2018 · 1 comment
Closed

in byte 89 longest state - there are north and south crolina #10

ghost opened this issue May 5, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented May 5, 2018

in the same length .... it returns me an error :

def test_get_longest_state():
  assert get_longest_state(us_state_abbrev) == 'South Carolina'

E AssertionError: assert 'North Carolina' == 'South Carolina'
E - North Carolina
E ? ^ ^
E + South Carolina
E ? ^ ^

@bbelderbos
Copy link
Collaborator

Hey Yosef, good point, thanks.

I did not hit this because I did not reverse the sort: sorted(data, key=len)[-1]

I updated the tests to accept both Carolinas as correct answers here:

correct_answers = ('North Carolina', 'South Carolina')
assert get_longest_state(us_state_abbrev) in correct_answers
assert get_longest_state(states) in correct_answers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant