[Tests] don't name test plugin 'testing"

If so named, pip won't install it.
This commit is contained in:
MinchinWeb 2021-05-16 21:12:32 -06:00
parent d63ba471ca
commit 3492dd291a
6 changed files with 24 additions and 21 deletions

View file

@ -168,6 +168,7 @@ situations other than a traditional export. They are:
- editable installs (`pip install -e ...`) don't seem to play nice with
the namespace layout. If your plugin isn't appearing, try a non-editable
install of both *jrnl* and your plugin.
- for examples, you can look to the *jrnl*'s internal importers and exporters.
- Don't name your plugin file "testing.py" or it won't be installed (at least
automatically) by pip.
As well, there are some basic external examples included in *jrnl*'s git repo
at `tests/external_plugins_src` (including the example code above).

View file

@ -5,7 +5,7 @@ import shutil
from jrnl.os_compat import on_windows
try:
from jrnl.contrib.exporter import testing as testing_exporter
from jrnl.contrib.exporter import flag as testing_exporter
except ImportError:
testing_exporter = None

View file

@ -33,25 +33,25 @@ Feature: Functionality of Importer and Exporter Plugins
Then the output should contain pyproject.toml version
And The output should contain "<plugin_name> : <version> from jrnl.<source>.<type>.<filename>"
Examples:
| plugin_name | version | source | type | filename |
| jrnl | <pyproject.toml version> | plugins | importer | jrnl |
| json | v1.0.0 | contrib | importer | json |
| boxed | <pyproject.toml version> | plugins | exporter | fancy |
| dates | <pyproject.toml version> | plugins | exporter | dates |
| default | <pyproject.toml version> | plugins | exporter | pretty |
| fancy | <pyproject.toml version> | plugins | exporter | fancy |
| json | v1.0.0 | contrib | exporter | json |
| markdown | <pyproject.toml version> | plugins | exporter | markdown |
| md | <pyproject.toml version> | plugins | exporter | markdown |
| pretty | <pyproject.toml version> | plugins | exporter | pretty |
| rot13 | v1.0.0 | contrib | exporter | rot13 |
| short | <pyproject.toml version> | plugins | exporter | short |
| tags | <pyproject.toml version> | plugins | exporter | tag |
| testing | v0.0.1 | contrib | exporter | testing |
| text | <pyproject.toml version> | plugins | exporter | text |
| txt | v1.0.0 | contrib | exporter | rot13 |
| xml | <pyproject.toml version> | plugins | exporter | xml |
| yaml | <pyproject.toml version> | plugins | exporter | yaml |
| plugin_name | version | source | type | filename |
| jrnl | <pyproject.toml version> | plugins | importer | jrnl |
| json | v1.0.0 | contrib | importer | simple_json |
| boxed | <pyproject.toml version> | plugins | exporter | fancy |
| dates | <pyproject.toml version> | plugins | exporter | dates |
| default | <pyproject.toml version> | plugins | exporter | pretty |
| fancy | <pyproject.toml version> | plugins | exporter | fancy |
| json | v1.0.0 | contrib | exporter | custom_json |
| markdown | <pyproject.toml version> | plugins | exporter | markdown |
| md | <pyproject.toml version> | plugins | exporter | markdown |
| pretty | <pyproject.toml version> | plugins | exporter | pretty |
| rot13 | v1.0.0 | contrib | exporter | rot13 |
| short | <pyproject.toml version> | plugins | exporter | short |
| tags | <pyproject.toml version> | plugins | exporter | tag |
| testing | v0.0.1 | contrib | exporter | flag |
| text | <pyproject.toml version> | plugins | exporter | text |
| txt | v1.0.0 | contrib | exporter | rot13 |
| xml | <pyproject.toml version> | plugins | exporter | xml |
| yaml | <pyproject.toml version> | plugins | exporter | yaml |
@skip_only_with_external_plugins
Scenario Outline: Do not list overridden plugin names in --version

View file

@ -6,6 +6,8 @@
"""
Exporter for testing and experimentation purposes.
It is not called "testing" because then it's not installed.
The presence of this plugin is also used as a "switch" by the test suite to
decide on whether or not to run the "vanilla" test suite, or the test suite
for external plugins.