MCPcopy
hub / github.com/stretchr/testify / Require

Method Require

suite/suite.go:57–64  ·  view source on GitHub ↗

Require returns a require context for suite.

()

Source from the content-addressed store, hash-verified

55
56// Require returns a require context for suite.
57func (suite *Suite) Require() *require.Assertions {
58 suite.mu.Lock()
59 defer suite.mu.Unlock()
60 if suite.require == nil {
61 panic("'Require' must not be called before 'Run' or 'SetT'")
62 }
63 return suite.require
64}
65
66// Assert returns an assert context for suite. Normally, you can call
67// `suite.NoError(expected, actual)`, but for situations where the embedded

Callers 5

TestRequireOneMethod · 0.80
TestRequireTwoMethod · 0.80
TestSuiteGettersFunction · 0.80
Test_B_PassesMethod · 0.80
TestUnInitializedSuitesFunction · 0.80

Calls

no outgoing calls

Tested by 5

TestRequireOneMethod · 0.64
TestRequireTwoMethod · 0.64
TestSuiteGettersFunction · 0.64
Test_B_PassesMethod · 0.64
TestUnInitializedSuitesFunction · 0.64