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

Function TestScopeSubScopeErrors

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

Source from the content-addressed store, hash-verified

53}
54
55func TestScopeSubScopeErrors(t *testing.T) {
56 var (
57 root = NewScope()
58 sub = root.SubScope("x")
59 )
60 // Error on the root, even after sub has been created should be propagated.
61 // Force an error by creating a Const which has a type that does not
62 // translate to the TensorFlow type system.
63 Const(root, int(1))
64 if err := root.Err(); err == nil {
65 t.Fatal("Expected error")
66 }
67 if err := sub.Err(); err == nil {
68 t.Errorf("Root scope had error [%v], but sub-scope did not", root.Err())
69 }
70}
71
72func TestControlDependencies(t *testing.T) {
73 var (

Callers

nothing calls this directly

Calls 4

NewScopeFunction · 0.85
SubScopeMethod · 0.80
ConstFunction · 0.70
ErrMethod · 0.45

Tested by

no test coverage detected