Files
slic/ci-reports/markdown/json-tree-view.txt
T

1538 lines
66 KiB
Plaintext

📁 ci-reports/markdown/pytest-report.json
├── created: 1753273841.5695295
├── duration: 7.11782431602478
├── exitcode: 1
├── root: /workspace/tligui_y/slic
├── environment
├── summary
│ ├── passed: 28
│ ├── failed: 4
│ ├── total: 32
│ └── collected: 32
├── collectors
│ ├── -
│ │ ├── nodeid:
│ │ ├── outcome: passed
│ │ └── result
│ │ └── -
│ │ ├── nodeid: .
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: ci-reports/allure/data/test-cases
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/allure/data
│ │ ├── outcome: passed
│ │ └── result
│ │ └── -
│ │ ├── nodeid: ci-reports/allure/data/test-cases
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: ci-reports/allure/export
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/allure/history
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/allure/plugin/behaviors
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/allure/plugin/packages
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/allure/plugin/screen-diff
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/allure/plugin
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/allure/plugin/behaviors
│ │ │ └── type: Dir
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/allure/plugin/packages
│ │ │ └── type: Dir
│ │ └── -
│ │ ├── nodeid: ci-reports/allure/plugin/screen-diff
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: ci-reports/allure/widgets
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/allure
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/allure/data
│ │ │ └── type: Dir
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/allure/export
│ │ │ └── type: Dir
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/allure/history
│ │ │ └── type: Dir
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/allure/plugin
│ │ │ └── type: Dir
│ │ └── -
│ │ ├── nodeid: ci-reports/allure/widgets
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: ci-reports/coverage
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/junit
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports/markdown
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: ci-reports
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/allure
│ │ │ └── type: Dir
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/coverage
│ │ │ └── type: Dir
│ │ ├── -
│ │ │ ├── nodeid: ci-reports/junit
│ │ │ └── type: Dir
│ │ └── -
│ │ ├── nodeid: ci-reports/markdown
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: outputs
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core/acquisition/broker
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core/acquisition
│ │ ├── outcome: passed
│ │ └── result
│ │ └── -
│ │ ├── nodeid: slic/core/acquisition/broker
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: slic/core/adjustable
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core/condition
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core/device
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core/scanner
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core/sensor
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core/task
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/core
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: slic/core/acquisition
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/core/adjustable
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/core/condition
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/core/device
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/core/scanner
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/core/sensor
│ │ │ └── type: Package
│ │ └── -
│ │ ├── nodeid: slic/core/task
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: slic/devices/cameras
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/endstations
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/general/detectors
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/general/unused
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/general
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/general/detectors
│ │ │ └── type: Package
│ │ └── -
│ │ ├── nodeid: slic/devices/general/unused
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: slic/devices/loptics
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/timing/events
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/timing
│ │ ├── outcome: passed
│ │ └── result
│ │ └── -
│ │ ├── nodeid: slic/devices/timing/events
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: slic/devices/xdiagnostics
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/xoptics/slits
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/xoptics/unused
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/devices/xoptics
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/xoptics/slits
│ │ │ └── type: Package
│ │ └── -
│ │ ├── nodeid: slic/devices/xoptics/unused
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: slic/devices
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/cameras
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/endstations
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/general
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/loptics
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/timing
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/devices/xdiagnostics
│ │ │ └── type: Package
│ │ └── -
│ │ ├── nodeid: slic/devices/xoptics
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: slic/gui/daqpanels
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/gui/widgets
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/gui
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: slic/gui/daqpanels
│ │ │ └── type: Package
│ │ └── -
│ │ ├── nodeid: slic/gui/widgets
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: slic/utils/ioc
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/utils/unused/xsim
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: slic/utils/unused
│ │ ├── outcome: passed
│ │ └── result
│ │ └── -
│ │ ├── nodeid: slic/utils/unused/xsim
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: slic/utils
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: slic/utils/ioc
│ │ │ └── type: Package
│ │ └── -
│ │ ├── nodeid: slic/utils/unused
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: slic
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: slic/core
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/devices
│ │ │ └── type: Package
│ │ ├── -
│ │ │ ├── nodeid: slic/gui
│ │ │ └── type: Package
│ │ └── -
│ │ ├── nodeid: slic/utils
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: temp-ci
│ │ ├── outcome: passed
│ │ └── result
│ ├── -
│ │ ├── nodeid: tests/test_bis.py
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-y-True
│ │ │ │ -Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-yes-Tr
│ │ │ │ ue-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-n-True
│ │ │ │ -Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-no-Fal
│ │ │ │ se-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-user_i
│ │ │ │ nput4-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-user_i
│ │ │ │ nput5-False-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-user_i
│ │ │ │ nput6-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[y-y-True-Qu
│ │ │ │ estion? [Y/n] ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[y-n-False-Q
│ │ │ │ uestion? [Y/n] ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[y--True-Que
│ │ │ │ stion? [Y/n] ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[n-y-True-Qu
│ │ │ │ estion? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[n-n-False-Q
│ │ │ │ uestion? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[n--False-Qu
│ │ │ │ estion? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid: tests/test_bis.py::test_ask_yes_no_ctrl_c
│ │ │ ├── type: Function
│ │ │ └── lineno: 44
│ │ ├── -
│ │ │ ├── nodeid: tests/test_bis.py::test_ask_yes_no_ctrl_d
│ │ │ ├── type: Function
│ │ │ └── lineno: 49
│ │ └── -
│ │ ├── nodeid: tests/test_bis.py::test_ask_yes_no_ctrl_d
│ │ ├── type: Function
│ │ └── lineno: 49
│ ├── -
│ │ ├── nodeid: tests/test_utils_ask_yes_no.py
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[None-y-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[None-yes-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[None-n-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[None-no-False-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[None-user_input4-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[None-user_input5-False-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[None-user_input6-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[y-y-True-Question? [Y/n] ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[y-n-True-Question? [Y/n] ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[y--True-Question? [Y/n] ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[n-y-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[n-n-True-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_default
│ │ │ │ s[n--False-Question? ]
│ │ │ ├── type: Function
│ │ │ └── lineno: 10
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_ctrl_c
│ │ │ ├── type: Function
│ │ │ └── lineno: 44
│ │ ├── -
│ │ │ ├── nodeid:
│ │ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_ctrl_d
│ │ │ ├── type: Function
│ │ │ └── lineno: 49
│ │ └── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_ctrl_d
│ │ ├── type: Function
│ │ └── lineno: 49
│ ├── -
│ │ ├── nodeid: tests
│ │ ├── outcome: passed
│ │ └── result
│ │ ├── -
│ │ │ ├── nodeid: tests/test_bis.py
│ │ │ └── type: Module
│ │ └── -
│ │ ├── nodeid: tests/test_utils_ask_yes_no.py
│ │ └── type: Module
│ └── -
│ ├── nodeid: .
│ ├── outcome: passed
│ └── result
│ ├── -
│ │ ├── nodeid: ci-reports
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: outputs
│ │ └── type: Dir
│ ├── -
│ │ ├── nodeid: slic
│ │ └── type: Package
│ ├── -
│ │ ├── nodeid: temp-ci
│ │ └── type: Dir
│ └── -
│ ├── nodeid: tests
│ └── type: Dir
├── tests
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-y-True-Questio
│ │ │ n? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-y-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-y-True-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.000655425013974309
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.000691613182425499
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.0004264330491423607
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-yes-True-Quest
│ │ │ ion? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-yes-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-yes-True-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00033490010537207127
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005100620910525322
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00017933500930666924
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-n-True-Questio
│ │ │ n? ]
│ │ ├── lineno: 10
│ │ ├── outcome: failed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-n-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-n-True-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003300418611615896
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.000807630131021142
│ │ │ ├── outcome: failed
│ │ │ ├── crash
│ │ │ │ ├── path: /workspace/tligui_y/slic/tests/test_bis.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: assert False == True
│ │ │ ├── traceback
│ │ │ │ └── -
│ │ │ │ ├── path: tests/test_bis.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: AssertionError
│ │ │ └── longrepr: default = None, user_input = 'n', expected_output =
│ │ │ True
│ │ │ expected_prompt = 'Question? '
│ │ │
│ │ │ @pytest.mark.parametrize(
│ │ │ "default, user_input, expected_output, expected_prompt",
│ │ │ [
│ │ │ (None, 'y', True, "Question? "),
│ │ │ (None, 'yes', True, "Question? "),
│ │ │ (None, 'n', True, "Question? "), #False
│ │ │ (None, 'no', False, "Question? "), #False
│ │ │ (None, ['maybe', 'y'], True, "Question? "),
│ │ │ (None, ['', 'no'], False, "Question? "),
│ │ │ (None, ['invalid', 'yes'], True, "Question? "),
│ │ │ ('y', 'y', True, "Question? [Y/n] "),
│ │ │ ('y', 'n', False, "Question? [Y/n] "), #False
│ │ │ ('y', '', True, "Question? [Y/n] "),
│ │ │ ('n', 'y', True, "Question? "),
│ │ │ ('n', 'n', False, "Question? "), #False
│ │ │ ('n', '', False, "Question? "),
│ │ │ ]
│ │ │ )
│ │ │ def test_ask_yes_no_with_defaults(default, user_input,
│ │ │ expected_output, expected_prompt):
│ │ │ patch_target = 'slic.utils.ask_yes_no.read_input'
│ │ │
│ │ │ if isinstance(user_input, list):
│ │ │ input_patch = patch(patch_target,
│ │ │ side_effect=user_input)
│ │ │ else:
│ │ │ input_patch = patch(patch_target,
│ │ │ return_value=user_input)
│ │ │
│ │ │ with input_patch as mock_input:
│ │ │ result = ask_yes_no("Question", default=default)
│ │ │ > assert result == expected_output
│ │ │ E assert False == True
│ │ │
│ │ │ tests/test_bis.py:39: AssertionError
│ │ └── teardown
│ │ ├── duration: 0.0002554650418460369
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-no-False-Quest
│ │ │ ion? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-no-False-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-no-False-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00034668506123125553
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005590650252997875
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00019053183495998383
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-user_input4-Tr
│ │ │ ue-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-user_input4-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-user_input4-True-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003243058454245329
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.000542839989066124
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.0001838579773902893
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-user_input5-Fa
│ │ │ lse-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-user_input5-False-Question?
│ │ │ │ ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-user_input5-False-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00032526999711990356
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005088599864393473
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00017987308092415333
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[None-user_input6-Tr
│ │ │ ue-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-user_input6-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-user_input6-True-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003127460367977619
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0006033899262547493
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00019249296747148037
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[y-y-True-Question?
│ │ │ [Y/n] ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[y-y-True-Question? [Y/n] ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── y-y-True-Question? [Y/n]
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00032350909896194935
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004992738831788301
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018512899987399578
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[y-n-False-Question?
│ │ │ [Y/n] ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[y-n-False-Question? [Y/n] ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── y-n-False-Question? [Y/n]
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.000316790072247386
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004855229053646326
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018352619372308254
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[y--True-Question?
│ │ │ [Y/n] ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[y--True-Question? [Y/n] ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── y--True-Question? [Y/n]
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003132580313831568
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004913080483675003
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00019618705846369267
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[n-y-True-Question?
│ │ │ ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[n-y-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n-y-True-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003161181230098009
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005894859787076712
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018292688764631748
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[n-n-False-Question?
│ │ │ ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[n-n-False-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n-n-False-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00031890091486275196
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004928119014948606
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018008402548730373
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_bis.py::test_ask_yes_no_with_defaults[n--False-Question?
│ │ │ ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[n--False-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n--False-Question?
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003270888701081276
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004958850331604481
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00019462499767541885
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid: tests/test_bis.py::test_ask_yes_no_ctrl_c
│ │ ├── lineno: 44
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_ctrl_c
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00011489004828035831
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004993109032511711
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00010666507296264172
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid: tests/test_bis.py::test_ask_yes_no_ctrl_d
│ │ ├── lineno: 49
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_ctrl_d
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n-False
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00023260898888111115
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005874962080270052
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00015885778702795506
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid: tests/test_bis.py::test_ask_yes_no_ctrl_d
│ │ ├── lineno: 49
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_ctrl_d
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── y-True
│ │ │ ├── test_bis.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0002316860482096672
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004946540575474501
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00015643611550331116
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[None-y
│ │ │ -True-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-y-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-y-True-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00033756205812096596
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005001639947295189
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018748012371361256
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[None-y
│ │ │ es-True-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-yes-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-yes-True-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003162878565490246
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0010907358955591917
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00019686901941895485
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[None-n
│ │ │ -True-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: failed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-n-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-n-True-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00032899901270866394
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0006358190439641476
│ │ │ ├── outcome: failed
│ │ │ ├── crash
│ │ │ │ ├── path:
│ │ │ │ │ /workspace/tligui_y/slic/tests/test_utils_ask_yes_no.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: assert False == True
│ │ │ ├── traceback
│ │ │ │ └── -
│ │ │ │ ├── path: tests/test_utils_ask_yes_no.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: AssertionError
│ │ │ └── longrepr: default = None, user_input = 'n', expected_output =
│ │ │ True
│ │ │ expected_prompt = 'Question? '
│ │ │
│ │ │ @pytest.mark.parametrize(
│ │ │ "default, user_input, expected_output, expected_prompt",
│ │ │ [
│ │ │ (None, 'y', True, "Question? "),
│ │ │ (None, 'yes', True, "Question? "),
│ │ │ (None, 'n', True, "Question? "), #False
│ │ │ (None, 'no', False, "Question? "), #False
│ │ │ (None, ['maybe', 'y'], True, "Question? "),
│ │ │ (None, ['', 'no'], False, "Question? "),
│ │ │ (None, ['invalid', 'yes'], True, "Question? "),
│ │ │ ('y', 'y', True, "Question? [Y/n] "),
│ │ │ ('y', 'n', True, "Question? [Y/n] "), #False
│ │ │ ('y', '', True, "Question? [Y/n] "),
│ │ │ ('n', 'y', True, "Question? "),
│ │ │ ('n', 'n', True, "Question? "), #False
│ │ │ ('n', '', False, "Question? "),
│ │ │ ]
│ │ │ )
│ │ │ def test_ask_yes_no_with_defaults(default, user_input,
│ │ │ expected_output, expected_prompt):
│ │ │ patch_target = 'slic.utils.ask_yes_no.read_input'
│ │ │
│ │ │ if isinstance(user_input, list):
│ │ │ input_patch = patch(patch_target,
│ │ │ side_effect=user_input)
│ │ │ else:
│ │ │ input_patch = patch(patch_target,
│ │ │ return_value=user_input)
│ │ │
│ │ │ with input_patch as mock_input:
│ │ │ result = ask_yes_no("Question", default=default)
│ │ │ > assert result == expected_output
│ │ │ E assert False == True
│ │ │
│ │ │ tests/test_utils_ask_yes_no.py:39: AssertionError
│ │ └── teardown
│ │ ├── duration: 0.00021933997049927711
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[None-n
│ │ │ o-False-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-no-False-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-no-False-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00033387402072548866
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005029111634939909
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00020202319137752056
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[None-u
│ │ │ ser_input4-True-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-user_input4-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-user_input4-True-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00031682103872299194
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005228288937360048
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018761400133371353
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[None-u
│ │ │ ser_input5-False-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-user_input5-False-Question?
│ │ │ │ ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-user_input5-False-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003148210234940052
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005114469677209854
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018780585378408432
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[None-u
│ │ │ ser_input6-True-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[None-user_input6-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── None-user_input6-True-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003268420696258545
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.000612339936196804
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.000182286836206913
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[y-y-Tr
│ │ │ ue-Question? [Y/n] ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[y-y-True-Question? [Y/n] ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── y-y-True-Question? [Y/n]
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.0003149609547108412
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004904780071228743
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018649385310709476
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[y-n-Tr
│ │ │ ue-Question? [Y/n] ]
│ │ ├── lineno: 10
│ │ ├── outcome: failed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[y-n-True-Question? [Y/n] ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── y-n-True-Question? [Y/n]
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00031522614881396294
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0006247498095035553
│ │ │ ├── outcome: failed
│ │ │ ├── crash
│ │ │ │ ├── path:
│ │ │ │ │ /workspace/tligui_y/slic/tests/test_utils_ask_yes_no.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: assert False == True
│ │ │ ├── traceback
│ │ │ │ └── -
│ │ │ │ ├── path: tests/test_utils_ask_yes_no.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: AssertionError
│ │ │ └── longrepr: default = 'y', user_input = 'n', expected_output =
│ │ │ True
│ │ │ expected_prompt = 'Question? [Y/n] '
│ │ │
│ │ │ @pytest.mark.parametrize(
│ │ │ "default, user_input, expected_output, expected_prompt",
│ │ │ [
│ │ │ (None, 'y', True, "Question? "),
│ │ │ (None, 'yes', True, "Question? "),
│ │ │ (None, 'n', True, "Question? "), #False
│ │ │ (None, 'no', False, "Question? "), #False
│ │ │ (None, ['maybe', 'y'], True, "Question? "),
│ │ │ (None, ['', 'no'], False, "Question? "),
│ │ │ (None, ['invalid', 'yes'], True, "Question? "),
│ │ │ ('y', 'y', True, "Question? [Y/n] "),
│ │ │ ('y', 'n', True, "Question? [Y/n] "), #False
│ │ │ ('y', '', True, "Question? [Y/n] "),
│ │ │ ('n', 'y', True, "Question? "),
│ │ │ ('n', 'n', True, "Question? "), #False
│ │ │ ('n', '', False, "Question? "),
│ │ │ ]
│ │ │ )
│ │ │ def test_ask_yes_no_with_defaults(default, user_input,
│ │ │ expected_output, expected_prompt):
│ │ │ patch_target = 'slic.utils.ask_yes_no.read_input'
│ │ │
│ │ │ if isinstance(user_input, list):
│ │ │ input_patch = patch(patch_target,
│ │ │ side_effect=user_input)
│ │ │ else:
│ │ │ input_patch = patch(patch_target,
│ │ │ return_value=user_input)
│ │ │
│ │ │ with input_patch as mock_input:
│ │ │ result = ask_yes_no("Question", default=default)
│ │ │ > assert result == expected_output
│ │ │ E assert False == True
│ │ │
│ │ │ tests/test_utils_ask_yes_no.py:39: AssertionError
│ │ └── teardown
│ │ ├── duration: 0.00020852102898061275
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[y--Tru
│ │ │ e-Question? [Y/n] ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[y--True-Question? [Y/n] ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── y--True-Question? [Y/n]
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.000337876845151186
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004942629020661116
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00018448801711201668
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[n-y-Tr
│ │ │ ue-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[n-y-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n-y-True-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00031569995917379856
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004964498803019524
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00019461801275610924
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[n-n-Tr
│ │ │ ue-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: failed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[n-n-True-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n-n-True-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00031345104798674583
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0006154458969831467
│ │ │ ├── outcome: failed
│ │ │ ├── crash
│ │ │ │ ├── path:
│ │ │ │ │ /workspace/tligui_y/slic/tests/test_utils_ask_yes_no.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: assert False == True
│ │ │ ├── traceback
│ │ │ │ └── -
│ │ │ │ ├── path: tests/test_utils_ask_yes_no.py
│ │ │ │ ├── lineno: 39
│ │ │ │ └── message: AssertionError
│ │ │ └── longrepr: default = 'n', user_input = 'n', expected_output =
│ │ │ True
│ │ │ expected_prompt = 'Question? '
│ │ │
│ │ │ @pytest.mark.parametrize(
│ │ │ "default, user_input, expected_output, expected_prompt",
│ │ │ [
│ │ │ (None, 'y', True, "Question? "),
│ │ │ (None, 'yes', True, "Question? "),
│ │ │ (None, 'n', True, "Question? "), #False
│ │ │ (None, 'no', False, "Question? "), #False
│ │ │ (None, ['maybe', 'y'], True, "Question? "),
│ │ │ (None, ['', 'no'], False, "Question? "),
│ │ │ (None, ['invalid', 'yes'], True, "Question? "),
│ │ │ ('y', 'y', True, "Question? [Y/n] "),
│ │ │ ('y', 'n', True, "Question? [Y/n] "), #False
│ │ │ ('y', '', True, "Question? [Y/n] "),
│ │ │ ('n', 'y', True, "Question? "),
│ │ │ ('n', 'n', True, "Question? "), #False
│ │ │ ('n', '', False, "Question? "),
│ │ │ ]
│ │ │ )
│ │ │ def test_ask_yes_no_with_defaults(default, user_input,
│ │ │ expected_output, expected_prompt):
│ │ │ patch_target = 'slic.utils.ask_yes_no.read_input'
│ │ │
│ │ │ if isinstance(user_input, list):
│ │ │ input_patch = patch(patch_target,
│ │ │ side_effect=user_input)
│ │ │ else:
│ │ │ input_patch = patch(patch_target,
│ │ │ return_value=user_input)
│ │ │
│ │ │ with input_patch as mock_input:
│ │ │ result = ask_yes_no("Question", default=default)
│ │ │ > assert result == expected_output
│ │ │ E assert False == True
│ │ │
│ │ │ tests/test_utils_ask_yes_no.py:39: AssertionError
│ │ └── teardown
│ │ ├── duration: 0.00020857201889157295
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid:
│ │ │ tests/test_utils_ask_yes_no.py::test_ask_yes_no_with_defaults[n--Fal
│ │ │ se-Question? ]
│ │ ├── lineno: 10
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_with_defaults[n--False-Question? ]
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n--False-Question?
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00032775592990219593
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0005106539465487003
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.0001862018834799528
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid: tests/test_utils_ask_yes_no.py::test_ask_yes_no_ctrl_c
│ │ ├── lineno: 44
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_ctrl_c
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.00011369283311069012
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004937078338116407
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.00011492916382849216
│ │ └── outcome: passed
│ ├── -
│ │ ├── nodeid: tests/test_utils_ask_yes_no.py::test_ask_yes_no_ctrl_d
│ │ ├── lineno: 49
│ │ ├── outcome: passed
│ │ ├── keywords
│ │ │ ├── test_ask_yes_no_ctrl_d
│ │ │ ├── parametrize
│ │ │ ├── pytestmark
│ │ │ ├── n-False
│ │ │ ├── test_utils_ask_yes_no.py
│ │ │ ├── tests
│ │ │ ├── slic
│ │ │ └──
│ │ ├── setup
│ │ │ ├── duration: 0.000233879080042243
│ │ │ └── outcome: passed
│ │ ├── call
│ │ │ ├── duration: 0.0004939150530844927
│ │ │ └── outcome: passed
│ │ └── teardown
│ │ ├── duration: 0.0001512069720774889
│ │ └── outcome: passed
│ └── -
│ ├── nodeid: tests/test_utils_ask_yes_no.py::test_ask_yes_no_ctrl_d
│ ├── lineno: 49
│ ├── outcome: passed
│ ├── keywords
│ │ ├── test_ask_yes_no_ctrl_d
│ │ ├── parametrize
│ │ ├── pytestmark
│ │ ├── y-True
│ │ ├── test_utils_ask_yes_no.py
│ │ ├── tests
│ │ ├── slic
│ │ └──
│ ├── setup
│ │ ├── duration: 0.00023460108786821365
│ │ └── outcome: passed
│ ├── call
│ │ ├── duration: 0.0005851979367434978
│ │ └── outcome: passed
│ └── teardown
│ ├── duration: 0.00016376981511712074
│ └── outcome: passed
└── warnings
├── -
│ ├── message: invalid escape sequence \-
│ ├── category: DeprecationWarning
│ ├── when: collect
│ ├── filename:
│ │ /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packa
│ │ ges/bsread/h5.py
│ └── lineno: 207
├── -
│ ├── message: pkg_resources is deprecated as an API. See
│ │ https://setuptools.pypa.io/en/latest/pkg_resources.html
│ ├── category: DeprecationWarning
│ ├── when: collect
│ ├── filename:
│ │ /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packa
│ │ ges/pyepics-3.4.3-py3.9.egg/epics/ca.py
│ └── lineno: 28
├── -
│ ├── message: Deprecated call to
│ │ `pkg_resources.declare_namespace('mpl_toolkits')`.
│ │ Implementing implicit namespace packages (as specified in PEP 420)
│ │ is preferred to `pkg_resources.declare_namespace`. See
│ │ https://setuptools.pypa.io/en/latest/references/keywords.html#keywor
│ │ d-namespace-packages
│ ├── category: DeprecationWarning
│ ├── when: collect
│ ├── filename:
│ │ /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packa
│ │ ges/pkg_resources/__init__.py
│ └── lineno: 3154
└── -
├── message: The module numpy.dual is deprecated. Instead of using
│ dual, use the functions directly from numpy or scipy.
├── category: DeprecationWarning
├── when: collect
├── filename:
│ /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packa
│ ges/scipy/fft/__init__.py
└── lineno: 97