ebu / ebu-tt-live-toolkit

Toolkit for supporting the EBU-TT Live specification
http://ebu.github.io/ebu-tt-live-toolkit/
BSD 3-Clause "New" or "Revised" License
25 stars 10 forks source link

Some BDD feature files aren't being run #499

Open danielthepope opened 5 years ago

danielthepope commented 5 years ago

The following files exist, but aren't being referenced in any test_*.py files, so they aren't being run.

features/styles/ebuttd_segmenter.feature features/styles/fontSize_inherited.feature features/styles/padding.feature

I was looking for a step definition in ebuttd_segmenter but couldn't find it!

danielthepope commented 5 years ago

All feature files

find . | grep \\.feature | sort | uniq | cut -c15-

Feature files referenced in tests

ag -Gtest_ "scenarios\(" | grep scenarios | awk -F\' '{print $2}' | sort | uniq
nigelmegitt commented 5 years ago

Thanks for spotting that @danielthepope - I don't know why it's in that state, or if those unreferenced features should be removed for example.

nigelmegitt commented 5 years ago

Looking at this more deeply, there seems to be a mixture of things happening. I think ebuttd_segmenter.feature was made by @EyalLavi as test cases pre-coding and nobody ever coded for them. For example it includes test steps:

Given two EBU-TT Live documents

and

When we merge the documents and convert to an EBU-TT-D document

but there is no step definition defined anywhere for them.

On the other hand it looks like fontSize_inherited.feature and padding.feature could be run almost unchanged. I tried running them and fontSize_inherited.feature runs fine, but padding.feature is currently missing a step definition for it contains <style_attribute> value <S2_value> applied to region.

nigelmegitt commented 5 years ago

Hmm, padding.feature currently seems to assume that the resulting computed_value is always expressed as a set of % values, but the code isn't doing that magic. I'll commit a change that runs the test, but it'll skip the dodgy lines until we work out what the code should be doing.