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

Example package for rez-test? #958

Closed
dbr opened this issue Sep 18, 2020 · 3 comments
Closed

Example package for rez-test? #958

dbr opened this issue Sep 18, 2020 · 3 comments

Comments

@dbr
Copy link
Contributor

dbr commented Sep 18, 2020

I had a look around and couldn't really find much info on how to set up a package to work with rez test (mostly just some discussion before the feature was implemented)

Only info I could find on even how to structure the tests attribute in package.py was a comment on #665 - with a bit of tweaking that worked, but it would be nice if there was a bit more complete example documented somewhere :D

name = "test_example"
version = "0.1.0"

requires = [
    ...
]

def commands():
    env["PYTHONPATH"].append("{root}/python")


tests = {
    'unit': {
        'command': 'pytest {root}/python/',
        'requires': ['pytest'],
    }
}
@nerdvegas
Copy link
Contributor

See https://github.com/nerdvegas/rez/wiki/Package-Definition-Guide#tests. I do think there should be a Testing Packages page however.

@dbr
Copy link
Contributor Author

dbr commented Sep 19, 2020

Ah, perfect, that page has all the info I need for now - thanks!

@nerdvegas
Copy link
Contributor

Closed, see #996

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

No branches or pull requests

2 participants