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

Documentation for unit testing #112

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

AakashGfude
Copy link
Member

@choldgraf @chrisjsewell, have added a few lines on unit testing. What do you think about this? Should I make it more/less verbose? Should I also write about using mock_document, MockEnv?

@chrisjsewell
Copy link
Member

Should I also write about using mock_document, MockEnv?

FYI in #107 I have removed these, and the tests now run as actual sandboxed sphinx builds. You might be interested to check it out.
This doesn't change what you have already written though, which looks fine 👍

@choldgraf
Copy link
Member

nice! agreed that this is an improvement. @chrisjsewell if you think we're moving away from MockFoo, then I think we can leave it out of the docs. As an aside, I think it's a simpler approach not so use these MockEnvs...it feels a little bit brittle since we aren't testing in the actual environment that Sphinx has when it runs.

@chrisjsewell
Copy link
Member

Well there’s a hierarchy of testing; where possible there should be low-level isolated tests per function, then other full scale integration tests.
But yeh, for this package the MockEnv was getting to complex, so has been removed.

@choldgraf
Copy link
Member

@chrisjsewell I agree - I just meant that when you're close to Mocking the entirety of a sphinx build, it makes sense to just use the whole sphinx build 😆

@choldgraf choldgraf merged commit f07f225 into executablebooks:master Mar 31, 2020
phaustin pushed a commit to phaustin/MyST-NB that referenced this pull request Apr 1, 2020
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