Pdoc(FAQ/TestMain): testing.M.Run()
is optional (#353)
Этот коммит содержится в:
родитель
ae808ea89b
коммит
027a1abf0e
1 изменённых файлов: 6 добавлений и 0 удалений
|
@ -355,9 +355,11 @@ func TestMain(m *testing.M) {
|
|||
Options: &opts,
|
||||
}.Run()
|
||||
|
||||
// Optional: Run `testing` package's logic besides godog.
|
||||
if st := m.Run(); st > status {
|
||||
status = st
|
||||
}
|
||||
|
||||
os.Exit(status)
|
||||
}
|
||||
```
|
||||
|
@ -386,9 +388,11 @@ func TestMain(m *testing.M) {
|
|||
Options: &opts,
|
||||
}.Run()
|
||||
|
||||
// Optional: Run `testing` package's logic besides godog.
|
||||
if st := m.Run(); st > status {
|
||||
status = st
|
||||
}
|
||||
|
||||
os.Exit(status)
|
||||
}
|
||||
```
|
||||
|
@ -417,9 +421,11 @@ func TestMain(m *testing.M) {
|
|||
Options: &opts,
|
||||
}.Run()
|
||||
|
||||
// Optional: Run `testing` package's logic besides godog.
|
||||
if st := m.Run(); st > status {
|
||||
status = st
|
||||
}
|
||||
|
||||
os.Exit(status)
|
||||
}
|
||||
```
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче