Commit Graph

35 Commits

Author SHA1 Message Date
Willem-Jan van Rootselaar 0df004a104
Update development_testing.md () 2024-08-12 21:59:06 +02:00
Franck Nijhof 8eeaf3af91
Rename Services to Service actions ()
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-07-16 12:05:05 +02:00
Bruno Enten 62fb1e29a7
Add tests requirements installation information ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-06-08 10:59:35 +02:00
Sid 0aea208f0e
Remove black from the Development testing page () 2024-03-07 09:37:46 +01:00
Erik Montnemery 463549f5ed
Correct instructions for invoking pip () 2023-08-23 14:15:01 +02:00
Christopher Fenner 3d1fec126b
Fix word duplication in testing instructions () 2023-07-07 10:07:27 +02:00
Scott Giminiani fc2ecc10aa
Remove example commands for flake8 and isort () 2023-06-27 21:18:37 +02:00
Allen Porter 3010fca7f5
Add imports for syrup example code snippets () 2023-03-16 16:02:25 +01:00
Franck Nijhof 234fd01d65
Add snapshot testing () 2023-02-20 19:13:55 +01:00
Artem Draft 0f993e39ef
Fix typo in the development testing () 2022-12-30 17:59:50 +01:00
Franck Nijhof 500457acd9
Not to Tox () 2022-11-23 14:40:48 +01:00
rappenze 07c779bad0
Fix the pytest command on testing page () 2022-08-23 11:49:37 +02:00
Robert Hillis 558b3a82d6
Add instructions for pytest asyncio-mode () 2022-07-10 23:06:57 +02:00
Erik Montnemery 46f92b2650
Update section about lint errors () 2022-02-19 12:21:39 +01:00
Erik Montnemery a3cf4fca9b
Add legacy-resolver option to manual pip () 2022-02-19 12:20:52 +01:00
David Roberts 222b9d7175
Update testing code samples for python 3.9 () 2022-01-16 14:59:47 +01:00
Paulus Schoutsen 42b0196253
Optimize dev env instructions ()
* Optimize dev env instructions

* Apply suggestions from code review

Co-authored-by: Tom Brien <TomBrien@users.noreply.github.com>

* Update extensions in others

* Typo

Co-authored-by: Tom Brien <TomBrien@users.noreply.github.com>
Co-authored-by: Tom Brien <tom@byth.co.uk>
2021-10-19 12:07:51 +01:00
karliemeads 3254b8359d
Change py.test -> pytest () 2021-04-21 23:03:55 +02:00
Philip Allgaier 38a2908528
Note about PR and tox requirements ()
* Note about PR and tox requirements

As confirmed by Paulus: https://discord.com/channels/330944238910963714/330990195199442944/798321546673389618

* Update docs/development_testing.md

Co-authored-by: Tom Brien <TomBrien@users.noreply.github.com>

Co-authored-by: Tom Brien <TomBrien@users.noreply.github.com>
2021-03-16 18:53:33 +01:00
Jean-Paul van Ravensberg 3213be0db1
Add codecov command to dev instructions ()
* Add codecov command

* Process review feedback
2020-11-02 01:47:26 +01:00
Sam Welek e47096e7d5
Fixes some Typos in the Documentation ()
* Fixing typo on development_enviornment.md

* Fixing various typos throughout the docs, it's not much but it's honest work
2020-10-11 15:47:52 +01:00
Martin Hjelmare fef5353496
Add how to write tests for integrations () 2020-09-30 16:43:33 +02:00
Franck Nijhof 08884e2cca
Collection of fixes and improvements () 2020-05-11 08:12:01 -07:00
Ville Skyttä 770185004b
Code block improvements ()
* Use f-strings instead of .format()

* Code block language marker fixes

* Make example code blocks syntactically valid Python

* Run all python code blocks through black

https://github.com/scop/misc/blob/master/black_markdown.py

* Add some missing code block language markers

* Use shell language consistently to mark shell code blocks

* Undo folding of some example dicts

* Remove outdated OrderedDict comments per Python 3.7, replace with plain dict
2020-01-13 21:55:41 +02:00
Michaël Arnauts fd0e9d5e0b Fix typo in development_testing.md () 2019-11-25 08:52:32 -08:00
Fabian Affolter f55f7e680a Add requirements on OS level for Fedora and Ubuntu () 2019-11-01 20:09:56 -07:00
Sean Mooney 7984f941e5 Update development_testing.md () 2019-06-20 08:36:32 -07:00
pp81381 359b6334b3 Update development_testing.md ()
I found that in the absence of the package constraints, the pip3 install command in the testing outside of tox section caused problems.
2019-05-06 09:49:09 +02:00
Neil Crosby 62b585644d Use tox-venv to allow tests to run on OSX ()
Installing `tox-venv` on OSX allows `tox` tests to be run, per https://community.home-assistant.io/t/installing-hass-on-macos-osx/69292

Alternatively, `tox-venv` _could_ be added directly into the https://github.com/home-assistant/home-assistant/blob/dev/script/bootstrap file, but since nobody outside of OSX developers seem to be having this problem it seemed safer to simply note it in the documentation.

Without installing `tox-venv` the following occurs:

    ERROR: invocation failed (exit code 100), logfile: /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/.tox/py37/log/py37-0.log
    ERROR: actionid: py37
    msg: getenv
    cmdargs: '/Users/neilcrosby/Documents/git-projects.nosync/home-assistant/bin/python3 -m virtualenv --python /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/bin/python3 py37'
    
    /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/lib/python3.7/site-packages/virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp
    Already using interpreter /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/bin/python3
    Using base prefix '/usr/local/bin/../Cellar/python/3.7.0/bin/../Frameworks/Python.framework/Versions/3.7'
    New python executable in /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/.tox/py37/bin/python3
    Also creating executable in /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/.tox/py37/bin/python
    ERROR: The executable /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/.tox/py37/bin/python3 is not functioning
    ERROR: It thinks sys.prefix is '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7' (should be '/Users/neilcrosby/Documents/git-projects.nosync/home-assistant/.tox/py37')
    ERROR: virtualenv is not compatible with this system or executable
    
    ERROR: Error creating virtualenv. Note that some special characters (e.g. ':' and unicode symbols) in paths are not supported by virtualenv. Error details: InvocationError('/Users/neilcrosby/Documents/git-projects.nosync/home-assistant/bin/python3 -m virtualenv --python /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/bin/python3 py37 (see /Users/neilcrosby/Documents/git-projects.nosync/home-assistant/.tox/py37/log/py37-0.log)', 100)
2018-10-23 21:45:34 +02:00
Robert Svensson d9462eb621 Simplify locating how to add dependencies to test environment () 2018-10-10 22:20:09 +02:00
David De Sloovere 53d3ed9fa1 Add virtual environment info to testing (tox) doc ()
* Update testing info with virtual environment

Being new to python, pip and virtual environments, I tried running `tox` without activating the virtual environment. This should make it a little bit more clear for newcomers.

* Update development_testing.md

* Update development_testing.md

* Update development_testing.md
2018-10-01 15:28:41 +02:00
Paulus Schoutsen 2fd443fe2c fix broken links 2018-04-25 14:19:41 -04:00
Paulus Schoutsen 9311326aec Remove unused header 2018-04-24 15:44:32 -04:00
Paulus Schoutsen 632bc81a20 Fix all headers 2018-04-24 11:46:45 -04:00
Paulus Schoutsen 746e35b7a7 Migrate to Docusaurus 2018-04-24 09:52:18 -04:00