parent
6415802f43
commit
412039b568
2 changed files with 14 additions and 0 deletions
|
@ -862,6 +862,8 @@ def parse_query(behaviour: Behaviour) -> Result[Query]:
|
|||
split_query = behaviour.query.split(" ")
|
||||
|
||||
for word in split_query:
|
||||
word = word.strip(",").strip()
|
||||
|
||||
if validator.is_valid(word):
|
||||
portion_plus_code = word
|
||||
|
||||
|
|
12
test.py
12
test.py
|
@ -121,6 +121,18 @@ tests: list[ContinuityTest] = [
|
|||
)
|
||||
],
|
||||
),
|
||||
ContinuityTest(
|
||||
query="8WWJ+4P, Singapore", # a comma!
|
||||
expected=[
|
||||
(
|
||||
"Temasek Polytechnic\n"
|
||||
"21 Tampines Avenue 1\n"
|
||||
"Tampines West\n"
|
||||
"529757\n"
|
||||
"Northeast, Singapore"
|
||||
)
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue