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

Delete the work directory before running the tests #1581

Merged
merged 4 commits into from
Dec 17, 2016

Conversation

asmeurer
Copy link
Contributor

Fixes #1580.

Let me know if you want me to add some kind of test.

@msarahan
Copy link
Contributor

Yes, please add a test. Whatever best reflects the situation that caused you the headache with the emacs feedstock.

@asmeurer
Copy link
Contributor Author

I guess a recipe test? Or is there a good mechanism for Python tests of this sort of thing now?

@asmeurer
Copy link
Contributor Author

Is this Travis test failure ignorable?

@asmeurer
Copy link
Contributor Author

Ugh you guys are doing CLAs now. 👎

@msarahan
Copy link
Contributor

The Travis test failure is ignorable. Conda 4.3 is in early release, and there's a known issue.

Recipes are often the easiest way to test this, but they're not the only way any more. See tests/test_build.py for some lower-level tests, and tests/test_api_build.py for higher-level tests that mostly use recipes, but do so via a Python API so that we get coverage info.

As a former Continuum employee, you're not required to sign the CLA. If they're really that upsetting to you, please email Travis. I'm sure he'd appreciate your take on the matter.

@asmeurer
Copy link
Contributor Author

Weird, rm_rf is deleting the contents of the work directory, but not the directory itself. Any idea why that might be happening?

It doesn't work right now because rm_rf is clearing the work directory but not
deleting the directory itself for some reason.
@msarahan
Copy link
Contributor

Regarding rm_rf, it probably is deleting it, but it is being re-created if you ever access that variable again. All folder variables create the folders that they represent if they do not exist when the variable is accessed. I got sick of having makedirs everywhere, and consolidated it.

I don't see the later access of that variable in the diff here, but that's probably what is happening.

The config wrapper might recreate it after it is deleted, so we only check
that its contents have been cleared.
@asmeurer
Copy link
Contributor Author

Ah that makes sense. Trying to completely delete it would be fragile and unnecessary, so I've changed the test to only check that it is empty.

@msarahan
Copy link
Contributor

Travis is as happy as it is going to be right now. Waiting on appveyor, then will merge. Thanks for the PR.

@msarahan
Copy link
Contributor

Fluke on appveyor - seems you are missing pytest-mock, which I just have added to master. Merging.

@dg-pb
Copy link

dg-pb commented Feb 27, 2017

Once work is not available anymore...

Could someone help me out to run pytest and make sure that conftest with custom options is properly picked up?

I was always using work directory for running tests on it...

@asmeurer
Copy link
Contributor Author

@dgrigonis you can use the source files section of the meta.yaml to copy your tests from the source to the tests directory.

@github-actions
Copy link

github-actions bot commented May 5, 2022

Hi there, thank you for your contribution!

This pull request has been automatically locked because it has not had recent activity after being closed.

Please open a new issue or pull request if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 5, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

work directory not deleted for test stage
3 participants