Skip to content
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

test methods require specific naming 'test_*' #15566

Closed
hackcl opened this issue Mar 28, 2024 · 3 comments
Closed

test methods require specific naming 'test_*' #15566

hackcl opened this issue Mar 28, 2024 · 3 comments
Labels
type: documentation A change or addition to the documentation

Comments

@hackcl
Copy link

hackcl commented Mar 28, 2024

Change Type

Addition

Area

Customization

Proposed Changes

If you create a Report class which should contain multiple tests it is required that each test starts with 'test_*' to be correct and to avoid an invalid Report.

@hackcl hackcl added status: needs triage This issue is awaiting triage by a maintainer type: documentation A change or addition to the documentation labels Mar 28, 2024
@hackcl
Copy link
Author

hackcl commented Mar 28, 2024

I would open a pull request as owner. 6fd27f8

@jeffgdotorg
Copy link
Contributor

jeffgdotorg commented Apr 1, 2024

Thanks for helping improve the NetBox documentation!

Because we're on the cusp of releasing the first beta of NetBox 4.0, I'm going to make an unusual request. Please bear with me, I think you'll understand.

One big thing that changes between 3.7 and 4.0 is that Reports cease to be their own "thing" and are merged into a special case of Custom Scripts. We've already done the work in the feature branch (which is where we've been doing the work that will become 4.0) to remove the Reports documentation and roll it into the Custom Scripts docs. Since this hint is valuable but not earth-shaking, and because merging your proposed PR would create a merge conflict the next time we go to make a periodic merge of develop into feature, we ask you to reformulate your proposed changes as follows:

  • Retarget your change to the Custom Scripts module in the feature branch. You'll need to find the right place for it, as we did some reorganizing in there.
  • Revise your change to conform with our conventions for use of Markdown in the NetBox docs. Specifically, please use backticks around both the method prefix and the example method name.

This implies that your change won't make it into 3.7.x, but we can live with that and are happy to adopt it for 4.0.x.

@jeffgdotorg jeffgdotorg added status: revisions needed This issue requires additional information to be actionable and removed status: needs triage This issue is awaiting triage by a maintainer labels Apr 1, 2024
@jeffgdotorg jeffgdotorg assigned hackcl and unassigned jeffgdotorg Apr 1, 2024
@jeffgdotorg jeffgdotorg added status: accepted This issue has been accepted for implementation and removed status: revisions needed This issue requires additional information to be actionable labels Apr 1, 2024
@jeffgdotorg jeffgdotorg added this to the v4.0 milestone Apr 1, 2024
@hackcl
Copy link
Author

hackcl commented Apr 5, 2024

@jeffgdotorg , Issue can be closed as I found the part I wanted to add already in the documentation for the new scripts:

A script can define one or more test methods to report on certain conditions. All test methods must have a name beginning with `test_` and accept no arguments beyond `self`.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
@jeremystretch jeremystretch removed this from the v4.0 milestone Apr 5, 2024
@jeremystretch jeremystretch removed the status: accepted This issue has been accepted for implementation label Apr 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

3 participants