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
Hi, I'd like to bring up the topic of these two features to attempt an
implementation. I believe there are a few points to discuss:
syntax alternatives
First of all, notice that whenever new identifiers are used, we run the risk of
driving linters crazy (that is already the case with describe, description,
context, it, the 'pending' variants, before, after and self).
dedicated identifiers
fdescribe, fdescription, fcontext, fit à la Jasmine, or similar.
tags
Here, the inspiration is clearly [rspec](https://relishapp.com/rspec/rspec-
core/v/3-4/docs/metadata/user-defined-metadata). I would not yet go as far as to
create a whole mechanism for user-defined metadata, just one for tags or even
just for the 'focus' feature.
In this case, we would need to move away from an AST towards something like a
concrete syntax tree such as redbaron and
similar or the tokenize module.
I'm sure there are quite a few more candidates. Having tags in the same line is
clumsier to type but more readable; having them in the previous or next line is
more comfortable to type but less intuitive, I think.
behaviour
Should we implement just 'focus' or a full 'tags' mechanism?
Relationship between focus and skip: which one takes precedence over which?
Tags-related:
Can tags apply to groups or only to examples?
Is the 'focus' tag automatically recognised or would it only run when specifying it as a CLI argument?
foreseeable problems
How to keep track of the tags of each example? We need to store them starting
from the point where the AST is transformed.
If implementing the full 'tags' feature, we should probably use it for the
existing 'skip' behaviour.
Currently, mamba runs the test tree depth-first, as it builds it. This
would need to be changed: the whole tree needs to be built before we can
decide which examples should run.
ping: @deusz@eferro because their work in #78 suggests they're interested in this, @fatuhoku because he originally wrote #20
The text was updated successfully, but these errors were encountered:
This issue was really useful to me for taking some decisions about tagging feature.
@gardenunez by now, for being consistent with _it, I have decided to use fit. But I think that only would be a nice addition, because we are using that convention on before.* and after.* hooks.
Hi, I'd like to bring up the topic of these two features to attempt an
implementation. I believe there are a few points to discuss:
syntax alternatives
First of all, notice that whenever new identifiers are used, we run the risk of
driving linters crazy (that is already the case with describe, description,
context, it, the 'pending' variants, before, after and self).
dedicated identifiers
fdescribe, fdescription, fcontext, fit à la
Jasmine, or similar.
tags
Here, the inspiration is clearly [rspec](https://relishapp.com/rspec/rspec-
core/v/3-4/docs/metadata/user-defined-metadata). I would not yet go as far as to
create a whole mechanism for user-defined metadata, just one for tags or even
just for the 'focus' feature.
Some ideas:
tags as additional arguments
as strings
as identifiers
tags as additional context managers
as strings
as identifiers
tags as context manager aliases
weird (but still valid) syntax mixture
tags in the previous line
It's probably harder to retrieve these from the AST.
as strings
as identifiers
tags in the next line
as strings
as identifiers
tags as comments
In this case, we would need to move away from an AST towards something like a
concrete syntax tree such as redbaron and
similar or the
tokenize
module.I'm sure there are quite a few more candidates. Having tags in the same line is
clumsier to type but more readable; having them in the previous or next line is
more comfortable to type but less intuitive, I think.
behaviour
foreseeable problems
from the point where the AST is transformed.
existing 'skip' behaviour.
would need to be changed: the whole tree needs to be built before we can
decide which examples should run.
ping: @deusz @eferro because their work in #78 suggests they're interested in this, @fatuhoku because he originally wrote #20
The text was updated successfully, but these errors were encountered: