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

Use pytest conftest.py #366

Closed
wants to merge 1 commit into from
Closed

Use pytest conftest.py #366

wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Jan 3, 2017

Let's replace some ugly hacks with proper pytest conftest.py hooks.
Test initialization of ipalib.api is now handled in
pytest_cmdline_main(). Pytest plugins, markers and ignores are also
moved into conftest.py. Additional guards make it possible to run tests
without ipaserver installed.

Copy link
Contributor

@apophys apophys left a comment

Choose a reason for hiding this comment

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

Since you are removing the pytest.ini file in the second commit anyway, could you rebase the commits into one?

Otherwise the modifications work and look good.

Let's replace some ugly hacks with proper pytest conftest.py hooks.
Test initialization of ipalib.api is now handled in
pytest_cmdline_main(). Pytest plugins, markers and ignores are also
moved into conftest.py. Additional guards make it possible to run tests
without ipaserver installed.

I added confcutdir to ensure that pytest does not leave our project
space. Pytest used pytest.ini or setup.py before but pytest.ini is gone.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@apophys apophys added the ack Pull Request approved, can be merged label Jan 5, 2017
@apophys
Copy link
Contributor

apophys commented Jan 5, 2017

Thank you for squashing the commits.

@MartinBasti
Copy link
Contributor

@MartinBasti MartinBasti added the pushed Pull Request has already been pushed label Jan 5, 2017
@MartinBasti MartinBasti closed this Jan 5, 2017
@tiran tiran deleted the conftest branch January 5, 2017 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
3 participants