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

Introducing "testing" object #1740

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fabal
Copy link

@fabal fabal commented May 1, 2024

Introducing a testing object available in late bindings, similar to the building object, but indicating a rez-test context.

@fabal fabal requested a review from a team as a code owner May 1, 2024 02:42
Copy link

linux-foundation-easycla bot commented May 1, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Signed-off-by: Fabrice Macagno <[email protected]>
Copy link

codecov bot commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.30%. Comparing base (36e0537) to head (bdf53a3).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1740      +/-   ##
==========================================
+ Coverage   58.29%   58.30%   +0.01%     
==========================================
  Files         126      126              
  Lines       17159    17162       +3     
  Branches     3505     3505              
==========================================
+ Hits        10002    10007       +5     
+ Misses       6493     6492       -1     
+ Partials      664      663       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just by looking at this PR, I'm struggling to see if it also applies to early bound functions. The description says that it's only for @late, but we have building in @early.

If the changes inject testing in @early, then the documentation should be adapted as such. If it doesn't then I think we should change the PR so that testing will also be available in @early.

Additionally, I would like to see a test or two.

Thanks!

docs/source/package_commands.rst Outdated Show resolved Hide resolved
Co-authored-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Fabrice Macagno <[email protected]>
@fabal
Copy link
Author

fabal commented May 6, 2024

I think early bound attributes are not relevant to rez-test scenarios because they're flattened upon install, meaning any logic will go away anyway. Unless I'm missing something?

I thought about adding some unit tests but I couldn't find counterparts for building use cases? Unless there aren't any?

@fnaum
Copy link

fnaum commented May 6, 2024

I also think that testing does not make sense in @early, as we early decorated functions are evaluated at build time.
so even if we add the object there it would always be false.

@JeanChristopheMorinPerso
Copy link
Member

Oh, yeah, you are right about @early, by bad.

As for the tests, I don't think there is any for building and we also don't have tests for rez-test. So it could be a good occasion to add some rez-tests tests.

@fabal
Copy link
Author

fabal commented May 12, 2024

Sounds good, we've carved out some time to add a few unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants