Skip to content

Documentation for unit testing#112

Merged
choldgraf merged 1 commit intoexecutablebooks:masterfrom
AakashGfude:testing-instructions
Mar 31, 2020
Merged

Documentation for unit testing#112
choldgraf merged 1 commit intoexecutablebooks:masterfrom
AakashGfude:testing-instructions

Conversation

@AakashGfude
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants