MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TestScopeFinalize

Function TestScopeFinalize

tensorflow/go/op/scope_test.go:130–145  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

128}
129
130func TestScopeFinalize(t *testing.T) {
131 var (
132 root = NewScope()
133 sub1 = root.SubScope("x")
134 sub2 = sub1.SubScope("y")
135 )
136 if _, err := sub1.Finalize(); err != nil {
137 t.Fatal(err)
138 }
139 if err := root.Err(); err == nil {
140 t.Error("Root scope's Err() should be non-nil once Finalize has been called")
141 }
142 if err := sub2.Err(); err == nil {
143 t.Error("Sub scope's Err() should be non-nil once Finalize has been called")
144 }
145}
146
147func TestMultipleGeneratedOps(t *testing.T) {
148 s := NewScope()

Callers

nothing calls this directly

Calls 5

NewScopeFunction · 0.85
SubScopeMethod · 0.80
FinalizeMethod · 0.45
ErrMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected