-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test fo excluding ferries on bikes
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@routing @bicycle @exclude | ||
Feature: Bicycle - Exclude flags | ||
Background: | ||
Given the profile file "bicycle" initialized with | ||
""" | ||
profile.excludable = Sequence { Set { 'ferry' } } | ||
""" | ||
Given the node map | ||
""" | ||
a....b~~~~~c...f | ||
: : | ||
d.....e | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | route | duration | # | | ||
| ab | service | | | always drivable | | ||
| bc | | ferry | 00:00:01 | not drivable for exclude=ferry, but fast. | | ||
| bd | service | | | always drivable | | ||
| de | service | | | always drivable | | ||
| ec | service | | | always drivable | | ||
| cf | service | | | always drivable | | ||
|
||
Scenario: Bicycle - exclude nothing | ||
When I route I should get | ||
| from | to | route | | ||
| a | f | ab,bc,cf,cf | | ||
|
||
When I match I should get | ||
| trace | matchings | duration | | ||
| abcf | abcf | 109 | | ||
|
||
When I request a travel time matrix I should get | ||
| | a | f | | ||
| a | 0 | 109 | | ||
| f | 109 | 0 | | ||
|
||
Scenario: Bicycle - exclude ferry | ||
Given the query options | ||
| exclude | ferry | | ||
|
||
When I route I should get | ||
| from | to | route | | ||
| a | f | ab,bd,de,ec,cf,cf | | ||
|
||
When I match I should get | ||
| trace | matchings | duration | | ||
| abcf | abcf | 301.2 | | ||
|
||
When I request a travel time matrix I should get | ||
| | a | f | | ||
| a | 0 | 301 +- 1 | | ||
| f | 301.2 +- 1 | 0 | | ||
|
||
|