-
Notifications
You must be signed in to change notification settings - Fork 45
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
tests: add (xfail) ETCS braking curve integration test #10294
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10294 +/- ##
==========================================
- Coverage 81.58% 81.56% -0.02%
==========================================
Files 1062 1062
Lines 104970 105009 +39
Branches 722 722
==========================================
+ Hits 85636 85655 +19
- Misses 19293 19313 +20
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -37,6 +37,13 @@ def small_infra() -> Iterator[Infra]: | |||
requests.delete(EDITOAST_URL + f"infra/{infra_id}/") | |||
|
|||
|
|||
@pytest.fixture(scope="session") | |||
def etcs_infra() -> Iterator[Infra]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how small is it? :p
@@ -115,9 +132,9 @@ class TestRollingStock: | |||
TestRollingStock.__test__ = False | |||
|
|||
|
|||
def create_fast_rolling_stocks(test_rolling_stocks: Optional[List[TestRollingStock]] = None): | |||
def create_rolling_stock(rolling_stock_json_path: Path, test_rolling_stocks: Optional[List[TestRollingStock]] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we add a return type?
@@ -187,6 +213,7 @@ def west_to_south_east_simulation( | |||
{"offset": 837034, "track": "TA2", "id": "a"}, | |||
{"offset": 4386000, "track": "TH1", "id": "b"}, | |||
], | |||
"schedule": [{"at": "b", "stop_for": "PT0S"}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a description of the new infra/rs somewhere?
assert get_current_or_next_speed_at(simulation_final_output, final_stop_const_brake_start_offset + 1) < 39.444 | ||
|
||
|
||
def get_current_or_next_speed_at(simulation_final_output: Dict[str, Any], position: int) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if we don't want to export it, let's call it _get_current_or_next_speed_at
* Added the final stop to get a final braking curve. * ETCS is not available, so unplugged it to avoid crash (fallback to const gamma). * So tests added are wrong and must break/be modified when plugging ETCS. Signed-off-by: Pierre-Etienne Bougué <[email protected]>
3e87ad4
to
53afcc1
Compare
To be merged once #10147
Fixes part of #9706