Commit Graph

458 Commits (f0caf4255139a991c9ff59e10ae276fd866e9059)

Author SHA1 Message Date
Åke Forslund 9c8c8e0144 Send time reference for "now" to Lingua-franca
This will provide timezone info as well as now reference to the
extracted sentences.
2020-01-29 15:33:28 +01:00
Åke Forslund f77fe9de58 Remove test cases
The functionallity of lingua franca has been verified so the language
specific test cases aren't needed anymore. The base test cases for
english for format.py and parse.py is left as long as those remain as
part of the utils module.
2020-01-18 08:58:23 +01:00
Åke Forslund fffa6cc9af Test track start and end queue messages 2020-01-15 11:50:51 +01:00
Åke Forslund 277fd92e8f Add tests for vlc audio backend 2020-01-15 09:06:50 +01:00
Åke Forslund 2a9d273f86 Add tests for simple audio backend 2020-01-15 09:06:50 +01:00
Åke Forslund 0b2610206d Add tests for speech dispatcher 2020-01-15 09:06:50 +01:00
Åke Forslund e74b0e3900 Add audioservice method tests
This includes init, shutdown, play, stop, next, previous, pause,
seek_backward, seek_forward, queue lower_volume, restore_volume and resume.
2020-01-15 09:06:50 +01:00
Åke Forslund d25a2b4293 Rename audio/test_interface.py to test_utils.py
This is more inline with the tests that are performed in the file.

This also adds a test for stop_speaking
2020-01-15 09:06:50 +01:00
Åke 7352bdf98d
Merge pull request #2451 from forslund/test/disable-failing-spanish
Disable failing spanish datetime test
2020-01-13 15:48:24 +01:00
Åke Forslund 5b01ab1b91 Disable failing spanish datetime test 2020-01-13 15:38:35 +01:00
Åke Forslund eb3250fe90 Add more TTS tests
- Tests for TTS base class
- Test for TTS playback queue
- Test for TTS Factory create
- Tests for Mimic2 TTS
- Tests for Mimic TTS
- Tests for Google TTS
2020-01-10 16:26:48 +01:00
Åke Forslund 2c65e8188c Add tests for MycroftSkill translate methods
Verifies that resources are read from both locale and dialog folders.
Also checks that fallbacks to en-us from other languages works as
expected.
2019-12-29 14:25:09 +01:00
Åke Forslund a730636866 Add tests for upload queue 2019-12-19 16:27:44 +01:00
Åke 2263fab0b6
Merge pull request #2418 from forslund/bugfix/missing-hotword-parts
Make sure hotword entry has phonemes and threshold
2019-12-09 20:24:58 +01:00
Åke Forslund 0d8cbb57e5 Add Testcase to verify hotword fallback behaviour 2019-12-09 16:28:54 +01:00
Chris Rogers 7338387d4d Add failing unit test for 100% 2019-12-06 15:18:14 -08:00
Åke c9de7b431e
Merge pull request #2400 from forslund/feature/python3.8
Fix broken test case on Python 3.8
2019-12-05 10:54:04 +01:00
Åke Forslund 5e863515da Fix broken test case on Python 3.8
- Simplify broken test and make it work on python 3.8
- Add python 3.8 to mandatory test cases
2019-12-01 12:56:01 +01:00
maxbachmann c058633dd5 improve test runtime 2019-11-30 10:22:59 +01:00
Åke e6385720b3
Merge pull request #2396 from maxbachmann/python2cleanup
cleanup python2 unicode
2019-11-27 08:46:20 +01:00
Åke e78a9730e1
Merge pull request #2386 from maxbachmann/dev
Add more time idioms (half past, etc.)
2019-11-27 08:41:02 +01:00
maxbachmann 87220ee85c add some more time idioms 2019-11-27 01:53:23 +01:00
maxbachmann 7a48297132 cleanup python2 unicode 2019-11-26 23:09:32 +01:00
Christian Clauss a1ff3fb355 Upgrade from pycodestyle to flake8 2019-11-19 23:07:52 +01:00
Mike Woudenberg cc5631c45f Adds rudimentary Dutch parsing support 2019-11-14 08:47:36 +01:00
Åke caf3341812
Merge pull request #2375 from forslund/bugfix/remove-all-events
Fix reference leak when using bus.remove_all_listeners
2019-11-07 23:08:27 +01:00
Åke Forslund 821189d0c7 Use specific date in the past during the test 2019-11-01 07:54:35 +01:00
Åke Forslund be133c5e64 Add testcase for this specific memory leak
Ensure that the event scheduler shutdown removes the all references in
the ThreadedEventEmitter.
2019-10-31 09:53:42 +01:00
Åke 324fe988aa
Merge pull request #2356 from ChanceNCounter/spanish-language-parsers
fix bug in isFractional_es and improve coverage
2019-10-14 16:04:57 +02:00
Kris Gesling b7786d4926
Merge pull request #2359 from MycroftAI/bugfix/test-logger-restore
Make skill's logging visible in tester
2019-10-10 22:06:15 +09:30
Åke Forslund af79c7c2d2 Make skill's logging visible
The skill logger was still set to the temporary logger, this resets it
to the intended logger name and handler
2019-10-10 09:19:59 +02:00
David Wagner 1a9a51fe56
Merge pull request #2354 from forslund/bugfix/settings-delitem
Add missing __delitem__ method
2019-10-07 10:44:48 -05:00
Åke 8126bcafce
Merge pull request #2346 from ChanceNCounter/tests/util-parse-en
fix bug, redundancy in parse_en; improve coverage
2019-10-07 13:22:23 +02:00
ChanceNCounter 1c41e523ce fix bug in isFractional_es and improve coverage
- Fix: isFractional_es() parsed fractions incorrectly
- Update: earlier commit msg suggested another fix:
  - Month parsing not fixed
  - Several failing tests (skipped) document problem
  - TODO and an issue also created
- Substantially improve parse_es.py test coverage
- TODO or comment several found bugs
  - Many lines remain uncovered, incl possible bugs
2019-10-05 14:46:09 -07:00
Åke Forslund 24d6cf9ea0 Add missing __delitem__ method
The delitem method is apparently used, for example by the alarm skill
2019-10-04 20:43:46 +02:00
Åke 8ffad68251
Merge pull request #2347 from ChanceNCounter/extractnumber-es-fix-and-add-extractnumbers
Fix extractnumber_es, add extract_numbers_es
2019-10-04 08:46:03 +02:00
Åke 90ceaa3c88
Merge pull request #2342 from ChanceNCounter/fix/convert-mixed-fraction-param-default
add default value to nice_number param
2019-10-04 08:43:15 +02:00
ChanceNCounter 1107f5d6cc Fix extractnumber_es, add extract_numbers_es
- Fix bug causing extractnumber_es to return a sum instead of a list
- Add Spanish parser to extract_numbers and extract_number

==== Fixed Issues ====
Closes #2310

====  Tech Notes ====
Further obscures #2056: short_scale and ordinals parameters added to the
Spanish parsers, but they don't do anything. Present for compat only.
There is a TODO for this.

==== Localization Notes ====
It's all Spanish stuff!

This will require a native Spanish speaker to analyze the relationship
between extractnumber and isFractional, and determine why certain
fractions do not parse correctly. There is a TODO for this.
2019-10-03 17:11:39 -07:00
ChanceNCounter 16d6bf4b22 fix bug, redundancy in parse_en; improve coverage
- Remove unreachable conditions from parse_en:1122-1133
  - input string passed through clean_string() on line 763
  - articles stripped from input before line 1122
  - removed conditions relied on presence of "the" in input
- Improved test coverage on parse_en.py by approx 65 statements
  - Directly test certain helper functions which are difficult to
invoke indirectly
  - Add tests for certain missed conditions
  - Approx. 20 uncovered statements remain
2019-10-03 14:41:21 -07:00
ChanceNCounter 8c50fe9700 add optional 'clock' param for displayed output
Add one more optional parameter: bool clock, always produces
digital clock-like output. "0h 3m" becomes "0:03:00".

Has no effect on resolutions YEARS or DAYS, and MINUTES won't print hrs.
2019-10-02 07:55:22 +02:00
ChanceNCounter 4253929d2c - make nice_duration handle years, datetimes, and ms
- Companion enum:
mycroft.util.format.TimeResolution
offers YEARS, DAYS, HOURS, MINUTES, SECONDS, or MILLISECONDS

- Will only return ms if MILLISECONDS is chosen. Default: SECONDS

- Update tests
2019-10-02 07:55:22 +02:00
ChanceNCounter 388d9afaa7 add default value to nice_number param
Add default value to nice_number & convert_mixed_fraction `denominator`

Add tests for convert_mixed_fraction
2019-10-01 06:55:44 -07:00
Kris Gesling ab04fe6b60
Merge pull request #2338 from forslund/bugfix/clear_once_events
Fix clearing of once events
2019-10-01 15:10:31 +09:30
Åke Forslund 425feb0590 Store correct function for once events
The handler was always stored even when the event was a once event and
thus was wrapped in once_wrapper.

This handles the once correctly.
2019-09-30 13:31:53 +02:00
Åke Forslund d41fe97fd6 Add test case for the previously failing string 2019-09-30 11:02:29 +02:00
Åke Forslund 48e93f3504 Fix TestSettings
Updates the settings to work with the new ones
2019-09-25 13:01:45 +02:00
Åke Forslund fcc4df6351 Clear msm device_skill_state before update/upload
Make sure to re-read the device_skill_state from disk before doing
changes so no information is lost.
2019-09-20 08:07:03 +02:00
Åke Forslund 9423f920c4 Update test cases to properly mock the DeviceApi 2019-09-18 08:02:29 +02:00
Åke Forslund f7c4700343 Remove log checks 2019-09-17 11:24:10 +02:00
Chris Veilleux 9c0c20e96d added deprecation warning for settingsmeta fields no longer used. 2019-09-17 11:24:10 +02:00