Skip to content
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

Improve test coverage #154

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

MatthewScholefield
Copy link
Collaborator

This refactors and improves test coverage. As a result, some issues with those tests were resolved.

Copy link
Collaborator

@forslund forslund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me the test_listen test fails

>       assert len(glob(join(activations_folder, '*.wav'))) == 1
E       AssertionError: assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = glob('/tmp/tmpyxkeafkq/activations/*.wav')
E        +      where '/tmp/tmpyxkeafkq/activations/*.wav' = join('/tmp/tmpyxkeafkq/activations', '*.wav')

test/scripts/test_listen.py:40: AssertionError

Complete test log: https://termbin.com/uto1

@@ -0,0 +1,40 @@
#!/usr/bin/env python3
# Copyright 2019 Mycroft AI Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2020

@MatthewScholefield
Copy link
Collaborator Author

MatthewScholefield commented Apr 30, 2020 via email

@forslund
Copy link
Collaborator

Yes every time. I've made sure to rerun the precise setup.py aswell

This allows clean exiting of the runner when used with a ReadWriteStream
This ensures rounding is handled properly. This also fixes a bug where 1.0 would be mapped to 32768 and converted back as -1
It's possible that this could cause a model to activate less at the 0.5 threshold
because the center wasn't adjusted properly
Fixtures are used consistently
A new TempFolder class has been created for reusability
A session-wide trained_model fixture has been added to speed up testing
@ShamoX
Copy link

ShamoX commented Jul 21, 2022

Hello,

Since I need that project, I decided to fork and advance. Sorry for the inconvenience but it can be reversed if Mycroft wants of course.

You will find your PR to the fork here.

Again, sorry for the inconvenient. I created a thread on Mycroft community forum to discuss if needed.

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.

None yet

4 participants