@@ -75,21 +75,25 @@ def pytest_addoption(parser: pytest.Parser) -> None:
7575 parser .addoption (
7676 "--population" ,
7777 action = "store" ,
78+ default = CLI_DEFAULT_POP ,
7879 help = "The simulated population to generate. Options are 'USA', 'RI', and 'sample'. sample will generate very small sample data." ,
7980 )
8081 parser .addoption (
8182 "--year" ,
8283 action = "store" ,
84+ default = CLI_DEFAULT_YEAR ,
8385 help = "The year to subset our data to." ,
8486 )
8587 parser .addoption (
8688 "--state" ,
8789 action = "store" ,
90+ default = CLI_DEFAULT_STATE ,
8891 help = "The state to subset our data to (if using full USA population) using 2-letter abbreviations. No argument means no subsetting will be done." ,
8992 )
9093 parser .addoption (
9194 "--engine" ,
9295 action = "store" ,
96+ default = CLI_DEFAULT_ENGINE ,
9397 help = "The engine used to generate data. Options are 'pandas' and 'dask'." ,
9498 )
9599
@@ -125,9 +129,9 @@ def dataset_params(
125129 f"population must be one of USA, RI, or sample. You passed in { population } ."
126130 )
127131
128- engine = request .config .getoption ("--engine" , default = CLI_DEFAULT_ENGINE )
129- state = request .config .getoption ("--state" , default = CLI_DEFAULT_STATE )
130- year = request .config .getoption ("--year" , default = CLI_DEFAULT_YEAR )
132+ engine = request .config .getoption ("--engine" )
133+ state = request .config .getoption ("--state" )
134+ year = request .config .getoption ("--year" )
131135 year = int (year ) if year is not None else year
132136
133137 return dataset_name , dataset_func , source , year , state , engine
@@ -193,7 +197,7 @@ def unnoised_dataset(
193197
194198@pytest .fixture (scope = "session" )
195199def dataset_name (request : pytest .FixtureRequest ) -> str :
196- dataset_arg = request .config .getoption ("--dataset" , default = CLI_DEFAULT_DATASET )
200+ dataset_arg = request .config .getoption ("--dataset" )
197201 return DATASET_ARG_TO_FULL_NAME_MAPPER [dataset_arg ]
198202
199203
0 commit comments