Skip to content

[EmbeddedMetadata] fix keywords error and add test coverage#2741

Open
spaceyuck wants to merge 4 commits into
stashapp:masterfrom
spaceyuck:EmbeddedMetadata-keyword-fix
Open

[EmbeddedMetadata] fix keywords error and add test coverage#2741
spaceyuck wants to merge 4 commits into
stashapp:masterfrom
spaceyuck:EmbeddedMetadata-keyword-fix

Conversation

@spaceyuck

Copy link
Copy Markdown
Contributor

Fixes an error in the keywords to tags logic, based on report by @NoNameHeath in the forum.

closes #2738
closes #2737

Scraper type(s)

  • imageByFragment

Examples to test

included in folder test-data

Short description

Aside from the small fix, this also adds unit test coverage (which necessitated a python file rename, and some small structural changes to be able to force both supported source library modes).

Here's a question: is it OK to place unit tests and test data within the same directory as the scraper? I couldn't find any other example with a unit test.

NoNameHeath and others added 3 commits May 6, 2026 21:21
…lse' referencing undeclared variable

This can probably be more elegant, but I truly know very little about python so wanted to make as few changes as possible.
…basic unit tests

this required renaming the python file, to make it importable

unit tests run both exiftool and pyexiv2 methods,and as such require
both installed and working
@feederbox826

feederbox826 commented May 10, 2026

Copy link
Copy Markdown
Member

also adds unit test coverage (which necessitated a python file rename

?

@DogmaDragon

Copy link
Copy Markdown
Contributor

Here's a question: is it OK to place unit tests and test data within the same directory as the scraper? I couldn't find any other example with a unit test.

I see no value in it for the end user. I would exclude it.

@spaceyuck

Copy link
Copy Markdown
Contributor Author

also adds unit test coverage (which necessitated a python file rename

?

python importable module names can't contain '-', which the old file name did

I see no value in it for the end user. I would exclude it.

I have moved the tests and test data into a subfolder for the scraper under a new top folder scraper-tests, this should keep all tests code and test data away from the actual scrapers while still mirroring the directory structure, so associations remain clear

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.

Can't import tags because value_parts variable is referenced before it's declared

4 participants