You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use of naive (and old-style) inner classes as the method for recursive namespacing works reasonably well, but currently makes it impossible to access "parent" class state.
The method_name.should_whatever test has a distinct self from the MainSpec outer class, and cannot access data set up by that parent class' setup. (So the inner test will fail.)
Would be rad if we could annotate the inner classes with a link to their parent to allow for this, changing the last line above to e.g. eq_(self.parent.value2, 'wut').
The text was updated successfully, but these errors were encountered:
Welp, forgot we already do this association for other bookkeeping purposes via _parent.
However, this is on the class objects - so we need a way to go from a handle to a class object, to a setup'd instance. At least in my own usage of Spec/Nose here, I never need any actual state from outside these classes, meaning that a "naive" instantiate-and-call-setup procedure should work reasonably well.
Use of naive (and old-style) inner classes as the method for recursive namespacing works reasonably well, but currently makes it impossible to access "parent" class state.
So in this example setup:
The
method_name.should_whatever
test has a distinctself
from theMainSpec
outer class, and cannot access data set up by that parent class'setup
. (So the inner test will fail.)Would be rad if we could annotate the inner classes with a link to their parent to allow for this, changing the last line above to e.g.
eq_(self.parent.value2, 'wut')
.The text was updated successfully, but these errors were encountered: