This adds the framework for unit testing Moonraker via pytest. Initally only moonraker.py, klippy_connection.py, and confighelper.py have acceptable coverage. Coverage for other modules will be added on an incremental basis, when most of Moonraker's source is covered tests will be conducted via GitHub actions. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
39 lines
772 B
Plaintext
39 lines
772 B
Plaintext
[prefix_sec one]
|
|
|
|
[prefix_sec two]
|
|
|
|
[prefix_sec three]
|
|
|
|
[test_options]
|
|
test_int: 1
|
|
test_float: 3.5
|
|
test_bool: True
|
|
test_string: Hello World
|
|
test_list:
|
|
one
|
|
two
|
|
three
|
|
test_int_list: 1,2,3
|
|
test_float_list: 1.5,2.8,3.2
|
|
test_multi_list:
|
|
1,2,3
|
|
4,5,6
|
|
test_dict:
|
|
one=1
|
|
two=2
|
|
three=3
|
|
test_dict_empty_field:
|
|
one=test
|
|
two
|
|
three
|
|
test_template: {secrets.mqtt_credentials.username}
|
|
test_gpio: gpiochip0/gpio26
|
|
test_gpio_no_chip: gpio26
|
|
test_gpio_invert: !gpiochip0/gpio26
|
|
test_gpio_no_chip_invert: !gpio26
|
|
# The following four options should result in an error, cant
|
|
# pullup/pulldown an output pin
|
|
test_gpio_pullup: ^gpiochip0/gpio26
|
|
test_gpio_pullup_no_chip: ^gpio26
|
|
test_gpio_pulldown: ~gpiochip0/gpio26
|
|
test_gpio_pulldown_no_chip: ~gpio26 |