-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6fd6131
commit dcbe9a3
Showing
3 changed files
with
57 additions
and
15 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
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
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,25 @@ | ||
import pytest | ||
from infrastructure_planning.macros import interpolate_values | ||
from pandas import DataFrame | ||
|
||
|
||
SOURCE_TABLE = DataFrame([ | ||
[2, 200], | ||
[6, 600], | ||
], columns=[ | ||
'x', 'y', | ||
]) | ||
|
||
|
||
@pytest.mark.parametrize('x, y', [ | ||
(0, 200), | ||
(1, 200), | ||
(2, 200), | ||
(3, 300), | ||
(4, 400), | ||
(5, 500), | ||
(6, 600), | ||
(7, 600), | ||
]) | ||
def test_interpolate_values(x, y): | ||
assert interpolate_values(SOURCE_TABLE, 'x', x)['y'] == y |