diff --git a/.github/workflows/testing_external_plugins.yaml b/.github/workflows/testing_external_plugins.yaml index e911bd53..b3615799 100644 --- a/.github/workflows/testing_external_plugins.yaml +++ b/.github/workflows/testing_external_plugins.yaml @@ -51,7 +51,7 @@ jobs: poetry config --local virtualenvs.in-project true poetry install --remove-untracked poetry install - poetry run python -m pip install -e "git+${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}#egg=jrnl-demo-plugins&subdirectory=tests/external_plugins_src" + poetry run python -m pip install "git+${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}#egg=jrnl-demo-plugins&subdirectory=tests/external_plugins_src" - name: Test with pytest if: success() || failure() diff --git a/features/plugins.feature b/features/plugins.feature index 298f03d8..530ac2d7 100644 --- a/features/plugins.feature +++ b/features/plugins.feature @@ -9,22 +9,22 @@ Feature: Functionality of Importer and Exporter Plugins And the output should not contain ".contrib." Examples: - | plugin_name | version | source | type | filename | - | jrnl | v2.8.1 | plugins | importer | jrnl | - | boxed | v2.8.1 | plugins | exporter | fancy | - | dates | v2.8.1 | plugins | exporter | dates | - | default | v2.8.1 | plugins | exporter | pretty | - | fancy | v2.8.1 | plugins | exporter | fancy | - | json | v2.8.1 | plugins | exporter | json | - | markdown | v2.8.1 | plugins | exporter | markdown | - | md | v2.8.1 | plugins | exporter | markdown | - | pretty | v2.8.1 | plugins | exporter | pretty | - | short | v2.8.1 | plugins | exporter | short | - | tags | v2.8.1 | plugins | exporter | tag | - | text | v2.8.1 | plugins | exporter | text | - | txt | v2.8.1 | plugins | exporter | text | - | xml | v2.8.1 | plugins | exporter | xml | - | yaml | v2.8.1 | plugins | exporter | yaml | + | plugin_name | version | source | type | filename | + | jrnl | | plugins | importer | jrnl | + | boxed | | plugins | exporter | fancy | + | dates | | plugins | exporter | dates | + | default | | plugins | exporter | pretty | + | fancy | | plugins | exporter | fancy | + | json | | plugins | exporter | json | + | markdown | | plugins | exporter | markdown | + | md | | plugins | exporter | markdown | + | pretty | | plugins | exporter | pretty | + | short | | plugins | exporter | short | + | tags | | plugins | exporter | tag | + | text | | plugins | exporter | text | + | txt | | plugins | exporter | text | + | xml | | plugins | exporter | xml | + | yaml | | plugins | exporter | yaml | @skip_only_with_external_plugins Scenario Outline: List external plugin names in --version @@ -33,25 +33,25 @@ Feature: Functionality of Importer and Exporter Plugins Then the output should contain pyproject.toml version And The output should contain " : from jrnl..." Examples: - | plugin_name | version | source | type | filename | - | jrnl | v2.8.1 | plugins | importer | jrnl | - | json | v1.0.0 | contrib | importer | json | - | boxed | v2.8.1 | plugins | exporter | fancy | - | dates | v2.8.1 | plugins | exporter | dates | - | default | v2.8.1 | plugins | exporter | pretty | - | fancy | v2.8.1 | plugins | exporter | fancy | - | json | v1.0.0 | contrib | exporter | json | - | markdown | v2.8.1 | plugins | exporter | markdown | - | md | v2.8.1 | plugins | exporter | markdown | - | pretty | v2.8.1 | plugins | exporter | pretty | - | rot13 | v1.0.0 | contrib | exporter | rot13 | - | short | v2.8.1 | plugins | exporter | short | - | tags | v2.8.1 | plugins | exporter | tag | - | testing | v0.0.1 | contrib | exporter | testing | - | text | v2.8.1 | plugins | exporter | text | - | txt | v1.0.0 | contrib | exporter | rot13 | - | xml | v2.8.1 | plugins | exporter | xml | - | yaml | v2.8.1 | plugins | exporter | yaml | + | plugin_name | version | source | type | filename | + | jrnl | | plugins | importer | jrnl | + | json | v1.0.0 | contrib | importer | json | + | boxed | | plugins | exporter | fancy | + | dates | | plugins | exporter | dates | + | default | | plugins | exporter | pretty | + | fancy | | plugins | exporter | fancy | + | json | v1.0.0 | contrib | exporter | json | + | markdown | | plugins | exporter | markdown | + | md | | plugins | exporter | markdown | + | pretty | | plugins | exporter | pretty | + | rot13 | v1.0.0 | contrib | exporter | rot13 | + | short | | plugins | exporter | short | + | tags | | plugins | exporter | tag | + | testing | v0.0.1 | contrib | exporter | testing | + | text | | plugins | exporter | text | + | txt | v1.0.0 | contrib | exporter | rot13 | + | xml | | plugins | exporter | xml | + | yaml | | plugins | exporter | yaml | @skip_only_with_external_plugins Scenario Outline: Do not list overridden plugin names in --version @@ -61,6 +61,6 @@ Feature: Functionality of Importer and Exporter Plugins And the output should not contain " : from jrnl..." Examples: - | plugin_name | version | source | type | filename | - | json | v2.8.1 | plugins | exporter | json | - | txt | v2.8.1 | plugins | exporter | text | + | plugin_name | version | source | type | filename | + | json | | plugins | exporter | json | + | txt | | plugins | exporter | text | diff --git a/features/steps/core.py b/features/steps/core.py index 5b95e25d..ce27ca8f 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -540,6 +540,11 @@ def check_output_version_inline(context): @then('the output should contain "{text}" or "{text2}"') def check_output_inline(context, text=None, text2=None): text = text or context.text + if "" in text: + pyproject = (Path(__file__) / ".." / ".." / ".." / "pyproject.toml").resolve() + pyproject_contents = toml.load(pyproject) + pyproject_version = pyproject_contents["tool"]["poetry"]["version"] + text = text.replace("", pyproject_version) out = context.stdout_capture.getvalue() assert (text and text in out) or (text2 and text2 in out)