| Q |
A |
| OS |
Linux |
| Shell & version |
bash 5.3.3 |
| bashunit version |
0.28.0 |
Summary
When changing the directory in set_up_before_script data providers stop working.
Current behavior
When the directory is changed in the set_up_before_script function, no arguments are passed to the test function from the data provider.
How to reproduce
Here is a minimal example:
#!/usr/bin/env bash
function set_up_before_script() {
cd "$(temp_dir)" || return 1
}
# @data_provider provider_x
function test_x() {
assert_equals data "$1"
}
function provider_x() {
data_set data
}
Summary
When changing the directory in
set_up_before_scriptdata providers stop working.Current behavior
When the directory is changed in the
set_up_before_scriptfunction, no arguments are passed to the test function from the data provider.How to reproduce
Here is a minimal example: