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
Mocking the data namespace (without the leading dot):
$cattest.q.tst.desc["Mocking"]{
should["support data namespace within the global namespace"]{
`myns.amock`foo;
`myns.bmock`bar;
};
};
throws a 'type error (namespaces with the leading dot work fine).
Exploring the environment reveals the root cause:
$testq --fail-hardtest.q'type
[9] /home/dk/conda/q/lib/qspec-1.3.3/mock.q:28: .tst.restore: / Drop each fully qualified symbol from its respective namespaceif[countremoveList;(.[;();_;]') .flip ((`sv-1_;last) @\:`vs) eachremoveList];
^
`.tst.removeListset ();
q.tst))`myns.a`myns.binremoveList11b
q.tst))-3!myns"()"
q.tst))get`..myns|::
a|`foo
b|`bar
q.tst))flip ((`sv-1_;last) @\:`vs) each`myns.a`myns.bmynsmyns
a b
q.tst)).[`myns;();_;`a] / failure'type
[11] .[`myns;();_;`a]
^
q.tst)).[`..myns;();_;`a] / success`..myns
q.tst))get`..myns|::
b|`bar
Data namespaces (the ones without the leading dot) within removeList are malformed. Instead of `ns.a`ns.b , their fully-qualified name should be `..ns.a`..ns.b.
Mocking the data namespace (without the leading dot):
throws a
'type
error (namespaces with the leading dot work fine).Exploring the environment reveals the root cause:
Data namespaces (the ones without the leading dot) within
removeList
are malformed. Instead of`ns.a`ns.b
, their fully-qualified name should be`..ns.a`..ns.b
.The related code: https://github.com/nugend/qspec/blob/master/lib/mock.q#L9-L11
The text was updated successfully, but these errors were encountered: