Skip to content

Un-hardcode city functions #106

@da-luce

Description

@da-luce

Functions should take in city data as an argument. Makes for easier testing, e.g. with duplicate names

"London", population = 100
"London", population = 1

and

"London", population = 1
"London", population = 100

should both return the one with population 100. This is easier to test with specific test cases for this. Ran into an issue where duplicate name test was passing before but failing after an update to cities.csv in #80 . Adding test like this ensures the binary search approach used before will never pass tests again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions