File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ NB_MODULE(_PyPartMC, m) {
471471 " Return a string with JSON representation of the object." )
472472 .def (" init_env_state" , Scenario::init_env_state,
473473 " Initialize the EnvState." )
474- .def (" aero_emissions" , Scenario::get_dist ,
474+ .def (" aero_emissions" , Scenario::get_aero_emission_dist ,
475475 " Return aero_emissions AeroDists at a given index." )
476476 .def_prop_ro (" aero_emissions_n_times" , Scenario::get_emissions_n_times,
477477 " Return the number of times specified for emissions." )
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ struct Scenario {
148148 );
149149 }
150150
151- static AeroDist* get_dist (const Scenario &self, const AeroData &aero_data, const int &idx) {
151+ static AeroDist* get_aero_emission_dist (const Scenario &self, const AeroData &aero_data, const int &idx) {
152152// if (idx < 0 || idx >= AeroDist::get_n_mode(self))
153153// throw std::out_of_range("Index out of range");
154154 AeroDist *ptr = new AeroDist ();
Original file line number Diff line number Diff line change @@ -201,7 +201,12 @@ def test_multi_mode(mode_names):
201201 emissions .mode (i ).name for i in range (emissions .n_mode )
202202 )
203203 assert mode_names == actual_mode_names
204- # TODO #223 : same for background
204+
205+ background = sut .aero_background (aero_data , 0 )
206+ actual_mode_names = tuple (
207+ background .mode (i ).name for i in range (background .n_mode )
208+ )
209+ assert mode_names == actual_mode_names
205210
206211 @staticmethod
207212 @pytest .mark .parametrize ("key" , ("aero_emissions" , "aero_background" ))
You can’t perform that action at this time.
0 commit comments