-
-
Notifications
You must be signed in to change notification settings - Fork 691
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
Testing utilities should be available to plugins #580
Comments
I needed this again today for |
One thing that would be useful is a way of constructing a |
Here's where I copied the testing utilities into |
|
I don't think this is needed any more - I've found a really nice pattern for testing plugins using |
I'm trying to write a plugin at the moment (datasette-atom) which needs to run unit tests against a full in-memory Datasette instance, in the same way that the Datasette test suite itself works.
I got it working by creating copies of the TestClient and TestResponse classes within the plugin itself:
simonw/datasette-atom@c0e3bd9#diff-33337525d2d877f7cc7f33737bfd2d7b
I had to do this because those classes are in the
tests/
directory within Datasette, so they don't get included in the package that ships to PyPI.It would be better if these classes were included in the main package in a way that made it easy for plugins to reuse them to write their own tests.
The text was updated successfully, but these errors were encountered: