Skip to content

Document EnableTestAssistant#800

Merged
aaronayres35 merged 5 commits into
masterfrom
doc/EnableTestAssistant
Jun 1, 2021
Merged

Document EnableTestAssistant#800
aaronayres35 merged 5 commits into
masterfrom
doc/EnableTestAssistant

Conversation

@aaronayres35
Copy link
Copy Markdown
Contributor

closes #774

This PR adds a brief section to the documentation describing the EnableTestAssistant. This is effectively meant as a starting point, and we will likely want to expand this documentation going forward. In any case, just mentioning its existence in the docs is a significant improvement over it being missing entirely.

A next step (in a future PR) would be to add an example test using the test assistant to showcase how to use it and some of the useful features. I was going to simply link to an existing test, but none of them felt really suited to be a good example for the documentation IMO. I think it will be useful to write a test specifically for the docs, possibly writing a test for on of the existing examples.

@aaronayres35 aaronayres35 changed the title Document EnableTestAssistant [WIP] Document EnableTestAssistant Apr 26, 2021
Copy link
Copy Markdown
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

Mostly LGTM as it is.

I too was looking through enable for uses of EnableTestAssistant and the usage i find most compelling is interestingly enough test_test_assistant - you could rewrite those tests to demonstrate EnableTestAssistant instead of testing it IMO.

Copy link
Copy Markdown
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread docs/source/enable/testing.rst Outdated
Comment thread docs/source/enable/testing.rst Outdated
Comment thread docs/source/enable/testing.rst Outdated
Comment on lines +26 to +29
The following is a Dummy TestCase to showcase some basics of the
:class:`~.EnableTestAssistant` functionality. It is not testing things
users would likely want to test, but it showcases the capabilities / usefulness
of the test assistant.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this paragraph is too verbose and unnecessary. You should be able to replace all of this with just "here is an example" and be done with it

Comment thread docs/source/enable/testing.rst Outdated
import unittest
from unittest import mock

from enable.component import Component
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we use enable.api here?

Comment thread docs/source/enable/testing.rst Outdated
from unittest import mock

from enable.component import Component
from enable.testing import EnableTestAssistant, _MockWindow
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe don't import and use _MockWindow. Let's not unnecessarily advertise private objects to end users in the docs.

aaronayres35 and others added 2 commits June 1, 2021 06:53
@aaronayres35 aaronayres35 changed the title [WIP] Document EnableTestAssistant Document EnableTestAssistant Jun 1, 2021
@aaronayres35 aaronayres35 merged commit fb7a668 into master Jun 1, 2021
@aaronayres35 aaronayres35 deleted the doc/EnableTestAssistant branch June 1, 2021 14:09
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.

Document EnableTestAssistant

2 participants