1
0
Fork 0
mirror of synced 2024-06-25 01:20:23 +12:00

Add simple test

This commit is contained in:
Serene-Arc 2022-07-22 17:31:08 +10:00
parent af3f98f59c
commit 27ca92ef15
2 changed files with 15 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1,6 @@
limit: 10
sort: new
subreddit:
- EarthPorn
- TwoXChromosomes
- Mindustry