Commit Graph

338 Commits (8e495870c2de5082cb11d0f20375a6c273f1e7f4)

Author SHA1 Message Date
Åke Forslund d25b679bd9 Don't force types for expected_data
Forcing all content to string limits the amount of tests that can be run with this. For example a list of strings will fail. This keeps the original type from the json
2018-05-29 16:54:04 +02:00
Åke Forslund e7a6a20967 Sort test cases so order is enforced 2018-05-28 15:32:56 +02:00
Åke Forslund d99377dc78 Fix discover_test get_skills_dir()
The discover_test didn't handle configurable data path correctly.
2018-05-28 09:10:35 +02:00
Matthew D. Scholefield b0b88bbd62 Remove all references to /opt/mycroft 2018-05-23 08:22:14 +02:00
Matthew D. Scholefield 14ceb1f1dd Remove all references to /opt/mycroft/skills
The only thing that should reference it is the config
2018-05-23 08:22:14 +02:00
Åke 95525205ec
Fix bad city information in test (#1607) 2018-05-23 08:21:10 +02:00
CarstenAgerskov a353c43748 Fixes for Python3 migration 2018-05-21 18:45:47 -05:00
Åke Forslund b9cb58be79 Fix single_test.py
Update metaclass declaration to python3 syntax
2018-05-21 15:42:16 +02:00
Åke Forslund 580c053e22 Use skill id similar to the normal loading
Fixes issues with skills using regexes.
2018-05-21 15:21:38 +02:00
Matthew D. Scholefield 7ef551ddc6 Fix error with skills test descriptor 2018-05-14 14:27:37 -05:00
Matthew D. Scholefield 0850f5073a Fix tests for Python 3
- Change print statements
 - Change queue import
2018-05-14 14:27:37 -05:00
Matthew D. Scholefield e3b87be48e Rename unit tests to test_name.py to be consistent
This also fixes pytest not picking up some tests
2018-05-14 14:27:37 -05:00
Åke Forslund 40fd0487d0 Clean up output slightly
The converse request / response messages are now hidden.
2018-05-14 14:27:37 -05:00
Åke Forslund 83a6be7fcb Override get_response to handle conversations
Adds the possibility to add a responses list in the test case. The test
will respond with each of the entries in the list to get_response
requests.

Ex:
{
  [...]
  "responses": ["yes", "Miami"]
}
2018-05-14 14:27:37 -05:00
Åke Forslund ce410c2f0c Fix expected_data
expected_data would fail in combination with Intent tests, this
differentiates it from the other rules
Add message type as "__type__" in the data for processing using
expected_data.
2018-05-14 14:27:37 -05:00
Åke Forslund c8b58f3f37 Inject message type as __type__ in the test data 2018-05-14 14:27:37 -05:00
Åke Forslund dc58402f39 Fix message_tester.py
Make skill optional and disable expected_dialog if missing.
2018-05-14 14:27:37 -05:00
Matthew D. Scholefield bd51eecd6a Switch test framework to pytest
Also sources the virtualenv before running tests
2018-05-14 14:27:37 -05:00
Åke Forslund e6017ec496 Fix issues detected by codacy 2018-05-14 14:27:37 -05:00
Åke Forslund 4a7cf45ada Add possibility to add a custom test runner
The custom test runner can be used for mocking third-party applications
or services.

To use create a __init__.py in the SKILL_DIR/test

The base of the file should look something like:

```python
from test.integrationtests.skills.skill_tester import SkillTest

def skill_runner(skill, example, emitter, loader, m1, m2):
    return SkillTest(skill, example, emitter).run(loader)
```

Then the skill_runner can be decorated by `mock.patch` to mock out resources.
2018-05-14 14:27:37 -05:00
Åke Forslund cab556450e Add expected_data option
Allows the intent test to check expected data content.

Example:

{
  "utterance": "set a weekend alarm at  9 am",
  "expected_data": {
      "ampm": "am",
      "time": "9",
      "daytype": "weekend"
  },
  "expected_response": "Okay. Setting a .* alarm"
}
2018-05-14 14:27:37 -05:00
Åke Forslund 9c4ac178b9 Give better feedback when skill isn't loaded
If a skill required for a test case isn't loaded an exception will be
raised.
2018-05-14 14:27:37 -05:00
Åke Forslund 3917726bb5 Use queue to get skill completion
This allows the skill test to exit directly after skill handler
completes.
2018-05-14 14:27:37 -05:00
Åke Forslund e7ead7ca6e Reduce timeout when skill has been handled 2018-05-14 14:27:37 -05:00
Matthew D. Scholefield 79bf94e48e Speed up intent tests by responding to converse requests 2018-05-14 14:27:37 -05:00
Åke Forslund 02565efd59 Use pytest to discover test cases 2018-05-14 14:27:37 -05:00
Matthew D. Scholefield 154ccd59d7 Expose single threaded training option from Padatious Service
This is necessary to prevent a deadlock when training during intent tests using pytest
2018-05-14 14:27:37 -05:00
Åke Forslund 921bc5f23d Add support for "expected dialog"
Loads dialogs and checks if any skills responds with one of the possible
dialogs.
2018-05-14 14:27:37 -05:00
Åke Forslund d10ba29f70 Fix pep8 issues 2018-05-14 14:27:37 -05:00
Åke Forslund 3fcb40c2bb Add new rule 'exists'
Rule is satisfied if the entry exists in the data field not taking into
account it's value at all:

Example:
{
    "utterance": "set an alarm on july 4th 2016 at 3pm",
    "evaluation_timeout": 10,
    "assert": "[['and', ['exists', 'ampm'], ['exists', 'time'] ]]"
}
2018-05-14 14:27:37 -05:00
Åke Forslund 90e719c29e Add padatious and fallbacks 2018-05-14 14:27:37 -05:00
Åke Forslund 3a9242c1c7 Allow utterance without intent_type and intents 2018-05-14 14:27:37 -05:00
Åke Forslund a206807606 Add simple script for running a single skill
Based on the skill_developers_testrunner.py, takes the path to a skill
as argument and runs any tests for that skill.
2018-05-14 14:27:37 -05:00
CarstenAgerskov 8ab30500d7 Cleaner and better format for examples in message_tester 2018-05-14 14:27:37 -05:00
CarstenAgerskov 1cbedaea3c Added test_all_skills. More doc. 2018-05-14 14:27:37 -05:00
CarstenAgerskov 6c226ea4d9 Added message tester utility. Reduced line length to <80 chars in general 2018-05-14 14:27:37 -05:00
CarstenAgerskov a16c2a0ecc Added support for context, mycroft response and more. 2018-05-14 14:27:37 -05:00
CarstenAgerskov 7e9a05f4e0 First cut at skill tester
Minimum viable solution for running existing testcases (json files).
Currently considered additions:
(16, 3) # TODO: Make template for testing one skill only, for the skill
developer to use
(138, 11) # TODO: Pass something to intent, that tells that this is a
test run. The skill intent can then avoid side effects
(144, 11) # TODO: add optional timeout parameter to test_case
(155, 11) # TODO: Check that all intents are checked (what about
context)
(169, 3) # TODO: Add command line utility to test an event against a
test_case, allow for debugging tests
(173, 11) # TODO: Add support for expected response, and others
2018-05-14 14:27:37 -05:00
Matthew D. Scholefield fc8424c9ee Make skill ids use skill folder
This is necessary because in Python 3, hash(x) changes every single start of the application. Using the skill folder makes it consistent. In addition, the skill folder makes it easier to debug parts of the application in comparison to using something like an md5sum
2018-05-10 18:52:17 -05:00
Åke Forslund 1d0844f2c4 Fix failing tests.
core.py: replace zip with list comprehension
test_parse_fr.py: remove superfluous "0":s
2018-05-02 09:17:50 +02:00
Åke Forslund d7494193d1 Remove backwards compatibility from tests 2018-04-27 08:58:36 -05:00
Åke Forslund b200d51d39 Fix test cases under python 3
Lots of minor fixes including, sorting dicts, making ints of strings,
     MagicMock file spec and some other things

A couple of issues in the mycroft-core code base were identified and
fixed. Most notably the incorrect version check for python three when
adding basestring.

Update .travis.yml
2018-04-27 08:50:46 -05:00
Matthew D. Scholefield cbf73d4b30 SSML Changes
- Engines now specify if they support ssml rather than the configuration
 - The text client strips out ssml tags
 - Engines can modify tags via the `self.modify_tag` method
2018-04-18 14:45:09 -05:00
Jarbas 7c6af2017c add SSML support 2018-04-18 14:45:09 -05:00
Åke aa4261252b
Merge pull request #1519 from MycroftAI/feature/stop-sigint
Shutdown improvements
2018-04-12 12:07:02 +02:00
Matthew D. Scholefield fa11ac7dbe Rename MycroftSkill.shutdown to MycroftSkill._shutdown
This removes the need for skills to call Super(MySkill, self).shutdown()
2018-04-11 21:29:14 -05:00
Åke Forslund e302821147 Rename TestSkill* to remove warning in pytest 2018-04-11 15:23:18 -05:00
Åke Forslund c14daa5844 Clean up the core method tests
- Use a single complete config file as config mock and mock.patch.dict to mock it.
2018-04-11 15:23:18 -05:00
Åke 46f6f734e3
Merge pull request #1509 from MycroftAI/feature/wait-for-messagebus
Wait for messagebus before emitting a message
2018-03-28 19:28:35 -05:00
Matthew D. Scholefield 5c8cf053a0 Remove code that waits for websocket to open
This is unnecessary now that WebsocketClient does this automatically
2018-03-28 19:19:56 -05:00
Michael Nguyen f6f89a13f4 fixed unit test 2018-03-22 14:23:27 -05:00
Matthew D. Scholefield 50fa87d78f Simplify version checking 2018-02-27 21:01:11 -06:00
Åke b58a533e39 Bugfix/munging related issues (#1434)
* Fix error message for enable_intent

The error was printed for each intent name mismatch instead of after all intents had been checked.

* Make sure intents aren't munged multiple times

Previously intents could be munged multiple times (This happened when enabling a disabled intent), resulting in an invalid name.

* Add test case for disable/enable intent

* Improve unmunging of messages

This make sure that only skill id's in the beginning of messages are removed and should speed up the process slightly

* Fix munging for register_vocab and register_regex

* Add testcases for register vocab and regex
2018-02-23 00:51:55 -06:00
Kévin C f0869dcf31
Merge branch 'dev' into dev 2018-02-15 12:51:45 +01:00
Åke ed6ab224c9
Merge pull request #1422 from forslund/feature/munge-keywords
Make keywords per skill to fix overlapping keyword names
2018-02-15 09:57:03 +01:00
Åke Forslund 364dce2c66 Update test cases to handle munged values 2018-02-15 09:28:56 +01:00
Michael Nguyen 50c7ab6c6e
Merge pull request #1364 from forslund/bugfix/scheduled-event
Bugfix/scheduled event
2018-02-13 22:34:51 -06:00
Augusto Monteiro 2b1e5b2714
Merge pull request #1400 from forslund/feature/swedish-lang-utils
Add format and parsing methods for swedish
2018-02-13 09:38:15 -03:00
Cakeh 85a13309e9 fix codacy issues 2018-02-12 12:21:07 +01:00
Cakeh c1918da9cb Add fr support for ordinal numbers and time qualifiers 2018-02-12 12:02:54 +01:00
Cakeh c45d228d91 Issue-1411 - Leave all nice_number formatting to language 2018-02-12 12:02:04 +01:00
Cakeh fcbf2eae9e Correct issues found by Codacy 2018-02-08 22:20:56 +01:00
Cakeh 3a11f39d7d Issue-1375 - Fix and complete french translation 2018-02-08 21:46:24 +01:00
Åke 708d3ecce1
Merge pull request #1412 from MycroftAI/feature/fix_nice_time
Fix bug in nice_time() for times before noon
2018-02-08 14:08:42 +01:00
Ale 27f974c3fe inserted new italian functions adapted from en
Add new tests for nice_time() and pronounce_number()
2018-02-08 10:58:36 +01:00
penrods 420b21e40e Fix bug in nice_time() for times before noon
Bonehead copy/paste and testing gap left a bug that reported things
like "negative 11 o'clock"
2018-02-08 01:29:05 -06:00
Åke Forslund a11b093e4d Add format and parsing methods for swedish 2018-02-01 15:32:08 +01:00
Åke b2af245554 Add match_one fuzzymatching function (#1372)
match_one finds the closest match for a query in a list or dictionary of
possibilities.
2018-02-01 01:52:14 -06:00
Åke Forslund 044c4c3c0f Fix broken test and codacy warning
- Restore nice_number_it
- Fix codacy warning about overriding str
- Fix octal representation of times in convert_time test
2018-01-31 14:09:06 +01:00
penrods 6dbf1e72d7 Add formater for numbers and time
Add support for:
* mycroft.util.format.nice_time()
* mycroft.util.format.prounce_number()
* implemented unittests for above

Also renamed the helper method convert_number() to
_convert_to_mixed_fraction()
2018-01-31 05:30:01 -06:00
Ale c56b293d3d Update italian parsing methods
Add extract_datetime_it
Add tests for italian methods
2018-01-29 09:47:10 +01:00
Ale 158b25170b translate italian functions for format.py and parse.py based on pt_pt job (#1363)
Add basic functions for Italian language

- nice_number()
- extract_number()
- normalize()
2018-01-25 15:58:32 +01:00
Åke Forslund 6c4f485323 Make handlers for single scheduled events one shot
- add_event() now accepts the parameter once, registring the event as a one shot event.
- remove_event for non-existing events is handled
- added a test for this
2018-01-16 17:39:51 +01:00
Åke Forslund 979b72c2df Add basic tests for add/removing event methods
Basic tests for:
- add_event
- remove_event
- schedule_event
- cancel_scheduled_event
2018-01-16 15:46:11 +01:00
Michael Nguyen f48068a50c
Merge pull request #1356 from forslund/test/separate-langs
Split the test_parse.py by language
2018-01-12 02:49:12 -06:00
Åke Forslund 35a5528a48 Split the test_parse.py by language
- switch over to utf-8 encoding for all the files
2018-01-10 16:21:28 +01:00
Jarbas 905e5397ed bing + houndify stt (#1229)
Add bing and Houndify stt backends
2018-01-09 13:41:26 +01:00
Åke Forslund 0114ce473e Split format.py and parse.py per language
Move the language specific functions and constants into separate files.
This will avoid many unnecessary conflicts due to involuntary encoding
changes.
2018-01-08 17:08:31 -06:00
aleale99 aa8f7a8e4b
minor correction on file
typo error on class name and constant name
2017-12-29 11:17:22 +01:00
Åke 277e8bc506
Merge pull request #1320 from forslund/feature/oauth-token
Add oauth token endpoint to device api
2017-12-21 17:56:43 +01:00
Åke Forslund 2c0237cb8d Add oauth token endpoint to device api
When a token has been generated for the provided developer credentials
id the method will return it as json, if it doesn't exist HTTPError will
be raised (404 not found)
2017-12-21 14:52:48 +01:00
Michael Nguyen 305825369f fixed unit test 2017-12-20 15:59:09 -06:00
Augusto Monteiro e3243e2a62
Merge pull request #1307 from forslund/bugfix/extract_datetime
Minor fix of extract datetime
2017-12-19 15:15:22 -05:00
Åke Forslund b7f5bd2dc4 Fix failing test (changed limit) 2017-12-15 13:03:57 +01:00
penrods 5a12fc471c Add new parse function fuzzy_match (take 2)
A fuzzy_match() produces a basic ratio match of two strings.
The result is between 0.0 and 1.0, where 1.0 is a perfect
match.
2017-12-15 05:54:14 -06:00
Åke Forslund 7b091e9b46 Add failing test cases for extract_datetime
- "tonight" isn't handled
- sentences containing nothing but a date throws an exception ("december 3")
2017-12-12 08:32:54 +01:00
jarbasai aa4d3a47cf pep8 strikes again 2017-12-12 03:22:11 +00:00
jarbasai 8f895118ce fix pt-pt tests TODOs 2017-12-12 02:32:44 +00:00
Åke Forslund fa430f2ec1 Correct test coverage
Previously the coverage counted the entire mycroft core including things
such as the docs and the tests themself. The inclusion of the actual
tests in the coverage metric scewed the metric quite a bit and the
inclusion of irrelevant files made the information presented by
coveralls cluttered.
2017-12-07 02:45:52 -06:00
Matthew D. Scholefield be638de12b Add general metrics 2017-11-22 23:39:14 -06:00
gaurav 3a40014122 Issue-1227 Fix arg =[] and ={}
Issue-1227 fixed line length

Issue-1227 fixed pep 8 E124

Issue-1227 fixed formatting
2017-11-22 23:17:16 -06:00
Matthew D. Scholefield 4c0ba6869e Add unit tests for messaging 2017-11-22 13:03:50 -06:00
Andrew Hayworth 6325c7ae7b Add replacment for Google TTS via Google Cloud Speech API
As noted on the Chromium Dev How-to [1] and on the
SpeechRecognition library docs [2], the Google TTS API
is really not the right API to call. While it's simple,
and allows you to authenticate via a simple token, it is
also limited to a max of *50* requests per day.

That's not a lot. I don't think many people will find that
useful, outside of quick testing (if they can even get an
API key - I couldn't figure out how to generate one that
worked correctly).

This commit introduces a new STT backend, google_cloud, so that
the Google STT backend can be deprecated eventually. To do so, we
needed to:
- Install the Google API Client Library
- Create a new STT class which knows how to turn a provided Google
  JSON credentials file into a string (the SpeechRecognition library
  expects you to pass in the JSON string, not a file path, nor an object).

Any person wishing to use this will need to:
- Enable the Cloud Speech API on the Google Cloud Platform console
- Create a new Service Account Key, and download the credentials to
  a secure location
- Configure that location in mycroft.conf, like so:

  "stt": {
    "google_cloud": {
      "credential" {
        "json": { contents of downloaded credentials }
      }
    }
  }

It's worth noting that the Cloud Speech API has a free quota of
60 minutes per month, which would probably stretch further than 50
individual requests. So for hobbyists, it should be nothing but
a net benefit.

[1] http://www.chromium.org/developers/how-tos/api-keys
[2] https://github.com/Uberi/speech_recognition/blob/master/reference/library-reference.rst#recognizer_instancerecognize_googleaudio_data-key--none-language--en-us-show_all--false
2017-11-15 22:10:00 -06:00
Åke Forslund b08cf2bf42 Add tests for creating pocketsphinx hotwords
Default to pocketsphinx when hotword config doesn't hit a predefined
hotword config
2017-11-09 13:54:48 -06:00
Åke Forslund baa5fbeff4 Fix file docstring. 2017-11-03 08:10:12 +01:00
Åke Forslund 6e4d91578b Add test for sending event 2017-11-03 08:10:12 +01:00
Åke Forslund 82b1e48571 Mock loading scheduler data 2017-11-03 08:10:12 +01:00
Åke Forslund 3004aada98 Add test cases for EventScheduler class
====  Tech Notes ====
- Add test cases
- Slight refactoring of EventScheduler class to make it easier to test
2017-11-03 08:10:12 +01:00
penrods 46a6787ed8 One more PEP8 2017-10-27 17:48:11 -05:00
penrods 683a226f42 PEP8 pickiness 2017-10-27 17:44:37 -05:00
penrods 72dbf83835 Fix PEP8 and unittest errors from PR 1049
PR 1049 introduced several cosmetic PEP8 errors that were easily fixed.
Additionally there are unittests that include non-ASCII characters which are
failing.  As Pt-PT support is a work-in-progress, I just commented them out
with TODOs next to them.
2017-10-27 17:39:05 -05:00
Jarbas e189dd97d9 Pt-PT translation (#1049)
Portuguese translation helpers!
2017-10-26 19:18:00 -04:00
Åke Forslund 1f4c98f29c Fix PEP-8 2017-10-26 19:02:32 -04:00
Åke Forslund 52a89327fe Fix storing settings in enclosure client
====  Tech Notes ====
- Fix save in enclosure client
- Add tests for save and merge
2017-10-26 19:02:32 -04:00
Åke Forslund b067e31e54 Fix failing travis and codacy
====  Tech Notes ====
- removed old main.py
- replace reference to ConfigurationManager in api tests
- reset configuration after use in configuration test
- Pep-8 issue
2017-10-26 19:02:32 -04:00
Åke Forslund 29f74c39bd Add test cases 2017-10-26 19:02:32 -04:00
Åke Forslund ea020eab4f Refactor configuration handling
====  Tech Notes ====
- Rewrite of configuration module. Reduced number of calls and simplified
logic.
- Patched configs now survives reload of config
2017-10-26 19:02:32 -04:00
Michael Nguyen f3dacfb204 ==== Tech Notes ====
added capability to auto upload changes from settingsmeta.json to home.mycroft.ai

====  Documentation Notes ====
If a developer make changes to the settingsmeta.json, then this will be auto uploaded to home.mycroft.ai

==== Protocol Notes ====
hash and uuid are now stored as variables in files located in ~/.mycroft/skills/{skill-name}
2017-10-12 12:35:50 -05:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Matthew D. Scholefield 403aeb9360 Upgrade Padatious to 0.3.2 which brings in entity support 2017-10-03 12:17:02 -05:00
Matthew D. Scholefield 07e94f2d07 Improve LOG code and add log unit test
Adjusts style for readability and generates methods dynamically
2017-09-20 12:45:22 -05:00
Matthew D. Scholefield 5e392f34aa Optimize imports
Remove unused imports and group local vs external alphabetically
2017-09-18 16:07:50 -05:00
Matthew D. Scholefield cfdc405da5 Add new LOG class 2017-09-18 13:56:06 -05:00
Åke Forslund 4d0fb1b739 Add test cases for version module 2017-09-15 00:04:24 -05:00
Jarbas e39d013282 Hotword factory (#1062)
* Create hotword_factory.py

* hotword factory

* hotword factory

* hotword factory

* pass language

* HotwordEngine base class

* standup_word config

* missing ,

* hotword factory

* missing ,

* HotWordEngine template

* hotword factory

* pep8

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* fix unittest

* fix conflicts

* recognizer dir fix

* fix path

* fix path

* correct path

* fix path for realz

* fix path for real realz

* path fixed, end of brain fart

* fix phoneme lenght

* compatibility

* num phonemes for non pocketsphinx modules

* pep8

* bug fix

* bug hunt
2017-09-14 23:34:16 -05:00
Åke Forslund 0d4a841d4e Make test_api slightly more robust 2017-09-14 11:01:32 +02:00
Åke Forslund fd75b05e82 Add tests for api module 2017-09-11 20:31:23 +02:00
Åke Forslund 4386fe1f04 Add tests for stt module 2017-09-07 15:21:58 +02:00
Michael Nguyen 01a7868d49 Merge pull request #1003 from forslund/test-skills-core
Test skills core
2017-08-31 16:00:14 -05:00
Augusto Monteiro 53648b8433 Merge pull request #1012 from forslund/refactor/cleanup-skills
Cleanup skills
2017-08-22 15:03:55 -04:00
Åke Forslund b0f49b0d37 Add tests for location
====  Tech Notes ====
The tests mocks the configuration to ensure the location is what's
expected.
2017-08-22 14:11:48 +02:00
Åke Forslund 29f882b63d More tests of mycroft.skill.core
====  Tech Notes ====
Tests for open_intent_envelope() and MycroftSkill context methods added
2017-08-22 13:00:25 +02:00
Åke Forslund 12bf78cd5f Move funcs only used in skill_tester from core.py
====  Tech Notes ====
Some functions have been orphaned in core.py and are only used in the
tests. To clean up these have been moved to where they're used.
2017-08-21 15:59:48 +02:00
Åke Forslund 92d6b6865c Skill ID is not used instead of name in intents
====  Tech Notes ====
Converse fix changed registring intents using id number rather than name
2017-08-21 09:23:29 +02:00
Åke Forslund 9f2813be34 Add basic test case for loading skills
==== Fixed Issues ====
NONE - replace with associated issue numbers, e.g. #123, #304

====  Tech Notes ====
NONE - explain new algorithms in detail, tool changes, etc.

====  Documentation Notes ====
NONE - description of a new feature or notes on behavior changes

==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.

==== Environment Notes ====
NONE - new package requirements, new files being written to disk, etc.

==== Protocol Notes ====
NONE - message types added or changed, new signals, APIs, etc.
2017-08-21 09:19:57 +02:00
Åke Forslund decc04d52a Add tests intent registration
==== Fixed Issues ====
NONE - replace with associated issue numbers, e.g. #123, #304

====  Tech Notes ====
NONE - explain new algorithms in detail, tool changes, etc.

====  Documentation Notes ====
NONE - description of a new feature or notes on behavior changes

==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.

==== Environment Notes ====
NONE - new package requirements, new files being written to disk, etc.

==== Protocol Notes ====
NONE - message types added or changed, new signals, APIs, etc.
2017-08-21 09:19:57 +02:00
Åke Forslund 6a764ce44e Move intent_service tests to correct directory
==== Tech notes  ====
During a rebase the intent_service test wasn't moved to the correct
directory
2017-08-19 09:30:27 +02:00
Åke Forslund 7bd603664a Fix skill settings test (broke in rebase) 2017-08-17 02:05:02 -05:00
Åke Forslund b5af1e2f28 Move audio tests to unittest dir 2017-08-17 02:05:02 -05:00
Åke Forslund 4e7defa89f Fix pep8 issues. 2017-08-17 02:05:02 -05:00
Åke Forslund 1c5da3e25d Move messagebus test to integration tests 2017-08-17 02:05:02 -05:00
Art McGee 828d305e6c This tests the messagebus for mycroft.
This is just a basic test of sending between websocket clients.  It makes sure the message gets to the other side. It doesn't check for correct ness.  More testing sure could be done.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-08-17 02:05:02 -05:00
Åke Forslund 4157585c0a Move lock tests into unittest directory 2017-08-17 02:05:02 -05:00
harika 173bee9f95 Fixed pep8 format 2017-08-17 02:05:02 -05:00
harika 4c3dd3aa7c Updating skill_tester to automate skills testing(regression) 2017-08-17 02:05:02 -05:00
harika 632df2a498 Update tests 2017-08-17 02:05:02 -05:00
harika cbbe3fe1cd __init__.py must be present 2017-08-17 02:05:02 -05:00
harika e2811ccde2 added some stuffs --arron says it's awesome! 2017-08-17 02:05:02 -05:00
Åke Forslund c8dd1a9b46 Make discover test directory settable
The skill directory can be specified when calling the discovery_test

`PYTHONPATH=./ python test/integrationtests/skills/discovery_test.py
 SKILL_DIR`
2017-08-17 02:05:02 -05:00
Åke Forslund f0a7a71e01 Fix shutdown error.
None type can be in skill list
2017-08-17 02:05:02 -05:00
Åke Forslund 39d0451143 Separate tests into unittests and integrationtests 2017-08-17 02:05:02 -05:00
Åke Forslund 949c3f91f4 Cleanup
- Load skills only once
- Fix find skill name method
- pep8 fix
2017-08-17 02:05:02 -05:00
Åke Forslund 73c53aa8ea Hackish first step to getting skill tester up and running 2017-08-17 02:05:02 -05:00
Åke Forslund ddb514e470 Add basic tests for context manager 2017-08-15 21:27:19 -05:00
Åke e7c55aaa43 Merge pull request #933 from MycroftAI/feature/skill-configuration
Feature/skill configuration
2017-08-02 08:57:28 +02:00
Michael Nguyen 48b26d1fbd added new test and put back is_stored property 2017-08-01 13:52:51 -05:00
Åke Forslund 68506cb519 Add basic tests for audio service 2017-07-31 13:37:17 +02:00
Michael Nguyen 1e8ee03674 fixed pep8 issues 2017-07-27 16:38:24 -05:00
Michael Nguyen 37ada28dbd refactored skill settings and fixed test 2017-07-27 16:28:32 -05:00
Connor Penrod 41698d4dbe Adds the ExtractDateTime parse function from Christopher (plus relevant tests) (#866)
Adds the ExtractDateTime parse function from Christopher.  When imported from mycroft/util/parse.py, it'll take a sentence like "What's the weather like 5 weeks from next Wednesday?" and will extract a python datetime object for that date.

* Added requirements.txt change for importing dateutil
2017-07-10 15:33:21 -05:00