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

Ensure test precondition setup.py should exist as a file #29

Closed
wants to merge 1 commit into from

Conversation

detrout
Copy link

@detrout detrout commented Jan 5, 2017

Hello,

I building a Debian package for your package, and discovered a problem where one of the tests was failing. It was because the tests were written to assume that they'd be run in the root of the source tree, and not a partially installed copy

As written the tests in test_tools assume the tests will be run in the
root of the source and that a file named setup.py will exist.

The Debian test runner installs the package into a subdirectory,
and then runs the tests there, which lets the test code create a setup.py directory.

This adds a test setUp and tearDown to add (and remove) an empty
setup.py if no setup.py file already exists

As written the tests in test_tools assume the tests will be run in the
root of the source and that a file named setup.py will exist.

The Debian test runner installs the package into a subdirectory,
and then runs the tests there.

This adds a test setUp and tearDown to add (and remove) an empty
setup.py if no setup.py file already exists
@xflr6
Copy link
Owner

xflr6 commented Jan 8, 2017

Hi there,

thanks for the proposed minimal fix (much appreciated).

As the current test for mkdirs() does not even test the actual creation of directories, I would like to improve that along with doing it better by running it inside a proper temporary directory instead of relying on being run in the source root.

Can you tell me if the proposed change in this branch would resolve your issue?

@xflr6
Copy link
Owner

xflr6 commented Jan 15, 2017

Okay, closing this in favour of a2eb0d9.

@xflr6 xflr6 closed this Jan 15, 2017
@detrout
Copy link
Author

detrout commented Jan 15, 2017

Sorry I got distracted, yes your branch works.

@xflr6
Copy link
Owner

xflr6 commented Jan 16, 2017

Thanks.

gijzelaerr pushed a commit to kernsuite-debian/python-graphviz that referenced this pull request Aug 20, 2018
… that there is a setup.py file doesn't apply.

Forwarded: xflr6/graphviz#29
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

2 participants