10000 Deprecate setting tags starting with a hyphen like `-tag` using the `[Tags]` setting · Issue #4380 · robotframework/robotframework · GitHub
[go: up one dir, main page]

Skip to content

Deprecate setting tags starting with a hyphen like -tag using the [Tags] setting #4380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pekkaklarck opened this issue Jun 22, 2022 · 0 comments

Comments

@pekkaklarck
Copy link
Member

We are planning to support removing globally set tags using the -tag syntax with the [Tags] setting both with tests and keywords (#4374). Because it is possible that tags using this format have been used, we need to deprecate this syntax first. In practice this kind of usages will cause deprecation warnings:

*** Test Cases ***
Example
    [Tags]    -example
    Keyword

*** Keywords ***
Keyword
    [Tags]    -another
    No Operation

This change applies only to the [Tags] setting, so using the -tag syntax in Settings has no special meaning and will cause no warning. It will also be possible to escape the -tag syntax with the [Tags] setting like \-tag in which case the literal value -tag will be used. Finally, if a tag is specified as a variable, the value is resolved only at the execution time and is used as-is. In practice this example would work without a warning and the test will get tags -example, -another and -third:

*** Settings ***
Test Tags        -example

*** Variables ***
${TAG}           -another

*** Test Cases ***
Example
    [Tags]    \-third    ${TAG}
    Keyword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0