Comments (6)
@linusbarth Could you fix this? I suppose it is related to #1471.
from testify.
I'm not sure why your pull request fixes this. But I needed some time to even notice that not the test fails but rather this is just output from an internal test.
If I run the test (go test -v -race -run TestSubtestPanic -failfast ./suite
) on the branch from your 1502-PR, I see no difference in output. Is this correct?
Also wouldn't it be better to somehow manipulate/mark/remove the output from the internal tests? (If that's even possible)
from testify.
@linusbarth #1502 is just a fix for an issue I found thanks to your mistake, but is NOT the fix for 1501. #1503 IS the fix.
from testify.
Well. I think that we need both #1502 and #1503. So I will just rebase #1503 on top of #1502.
from testify.
We have another test failure in suite
:
$ go test -run TestSuiteWithStats -failfast -parallel 1 -count=1 ./suite
--- FAIL: WithStats (0.00s)
--- FAIL: WithStats/TestPanic (0.00s)
suite.go:87: test panicked: oops
goroutine 21 [running]:
runtime/debug.Stack()
/usr/local/Cellar/go/1.21.3/libexec/src/runtime/debug/stack.go:24 +0x5e
github.com/stretchr/testify/suite.failOnPanic(0xc000134340, {0x13ef4a0, 0x14f7f10})
/Users/omengue/go/src/github.com/stretchr/testify/suite/suite.go:87 +0x39
github.com/stretchr/testify/suite.Run.func1.1()
/Users/omengue/go/src/github.com/stretchr/testify/suite/suite.go:184 +0x24c
panic({0x13ef4a0?, 0x14f7f10?})
/usr/local/Cellar/go/1.21.3/libexec/src/runtime/panic.go:914 +0x21f
github.com/stretchr/testify/suite.(*suiteWithStats).TestPanic(0x0?)
/Users/omengue/go/src/github.com/stretchr/testify/suite/suite_test.go:549 +0x25
reflect.Value.call({0xc0000f9e00?, 0xc00009b008?, 0x13?}, {0x146993b, 0x4}, {0xc00004be70, 0x1, 0x1?})
/usr/local/Cellar/go/1.21.3/libexec/src/reflect/value.go:596 +0xce7
reflect.Value.Call({0xc0000f9e00?, 0xc00009b008?, 0x13d1b2f?}, {0xc000036670?, 0x11180cd?, 0x16d2098?})
/usr/local/Cellar/go/1.21.3/libexec/src/reflect/value.go:380 +0xb9
github.com/stretchr/testify/suite.Run.func1(0xc000134340)
/Users/omengue/go/src/github.com/stretchr/testify/suite/suite.go:198 +0x467
testing.tRunner(0xc000134340, 0xc00012e090)
/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 20
/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1648 +0x3ad
--- FAIL: TestSuiteWithStats (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x131fd22]
goroutine 19 [running]:
testing.tRunner.func1.2({0x1409f20, 0x17a5c80})
/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1545 +0x238
testing.tRunner.func1()
/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1548 +0x397
panic({0x1409f20?, 0x17a5c80?})
/usr/local/Cellar/go/1.21.3/libexec/src/runtime/panic.go:914 +0x21f
github.com/stretchr/testify/suite.TestSuiteWithStats(0x0?)
/Users/omengue/go/src/github.com/stretchr/testify/suite/suite_test.go:571 +0x242
testing.tRunner(0xc0000831e0, 0x149d878)
/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 1
/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1648 +0x3ad
FAIL github.com/stretchr/testify/suite 0.648s
FAIL
from testify.
#1503 didn't work. TestSubtestPanic
wasn't the only test to have issues.
#1504 is (hopefully) the real fix: use consistent subtest-like names for subtests when running them via testing.InternalTest and testing.RunTests.
from testify.
Related Issues (20)
- Data race when mock is called with refernce to same object as expectation HOT 1
- assert fails and expects to dereference a reference HOT 1
- Add GoLang 1.22 to CI Testing Matrix for Package Compatibility Verification HOT 2
- error while importing github.com/stretchr/testify/suite: read C:\Program Files\Go\src\math\huge_test.go: unexpected NUL in input HOT 1
- AnythingOfType is marked deprecated on pkgsite HOT 1
- .On().Return() doesn't enforce expectation for the returned value HOT 1
- v1.9.0 breaks float comparisons with EqualValues HOT 6
- mock: cleanup argument matching API HOT 7
- Integer overflow in time.Time comparison
- EqualExportedValues can compare two slices HOT 2
- Regexp accepts interface{} HOT 3
- Drop outdated/abandoned dependencies HOT 3
- Proposal: Must-like utility HOT 3
- Proposal: assert.NotElementsMatch() HOT 4
- assert: invalid memory address or nil pointer dereference for assert.Error on darwin/arm64 HOT 1
- mock: Diff is prone to data races
- call.Unset() panics when call := mockObj.On("Foo", mock.AnythingOfType("foo")) HOT 1
- Proposal: assert.NoFieldIsEmpty HOT 13
- Feature request: add BeforeSetupTest and AfterTearDownTest HOT 3
- Misleading Error() docs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testify.