Add simple test
This commit is contained in:
@@ -22,3 +22,12 @@ def test_process_click_context(arg_dict: dict):
|
||||
test_config.process_click_arguments(test_context)
|
||||
test_config = vars(test_config)
|
||||
assert all([test_config[arg] == arg_dict[arg] for arg in arg_dict.keys()])
|
||||
|
||||
|
||||
def test_yaml_file_read():
|
||||
file = './yaml_test_configuration.yaml'
|
||||
test_config = Configuration()
|
||||
test_config.parse_yaml_options(file)
|
||||
assert test_config.subreddit == ['EarthPorn', 'TwoXChromosomes', 'Mindustry']
|
||||
assert test_config.sort == 'new'
|
||||
assert test_config.limit == 10
|
||||
|
||||
Reference in New Issue
Block a user