tap: inherit strict mode in subtests
Previous behaviour was quite illogical and unexpected. If user once defined strict mode at start of tests it's expected that all subtests also will have strict mode. However before this patch it wasn't so. And wasn't clear at start why enabled strict mode didn't work. After this patch subtests strict mode will be the same as for parent. This behaviour wasn't tested anyhow and wasn't documented. Follow-up #4125 @TarantoolBot document Title: clarify 'strict' behaviour in tap tests Defined for root tap object strict mode will be the same for all subtests. Example: ```lua t = require('tap').test('123') t.strict = true t:is_deeply({a = box.NULL}, {}) -- false t:test('subtest', function(t) t:is_deeply({a = box.NULL}, {}) -- also false end) ``` (cherry picked from commit 676582c4)
Showing
- changelogs/unreleased/inherit-strict-mode-for-tap-subtests.md 3 additions, 0 deletions...gelogs/unreleased/inherit-strict-mode-for-tap-subtests.md
- src/lua/tap.lua 1 addition, 1 deletionsrc/lua/tap.lua
- test/app-tap/tap.result 23 additions, 3 deletionstest/app-tap/tap.result
- test/app-tap/tap.test.lua 8 additions, 1 deletiontest/app-tap/tap.test.lua
Loading
Please register or sign in to comment