Substituted 'yml' to '.yaml' in relevant files
This commit is contained in:
		
							parent
							
								
									50b846e9d3
								
							
						
					
					
						commit
						1b0e8d73d5
					
				|  | @ -12,14 +12,14 @@ A basic example for specifying tests in Yaml files | ||||||
| .. _`pytest-yamlwsgi`: http://bitbucket.org/aafshar/pytest-yamlwsgi/src/tip/pytest_yamlwsgi.py | .. _`pytest-yamlwsgi`: http://bitbucket.org/aafshar/pytest-yamlwsgi/src/tip/pytest_yamlwsgi.py | ||||||
| .. _`PyYAML`: https://pypi.org/project/PyYAML/ | .. _`PyYAML`: https://pypi.org/project/PyYAML/ | ||||||
| 
 | 
 | ||||||
| Here is an example ``conftest.py`` (extracted from Ali Afshnars special purpose `pytest-yamlwsgi`_ plugin).   This ``conftest.py`` will  collect ``test*.yml`` files and will execute the yaml-formatted content as custom tests: | Here is an example ``conftest.py`` (extracted from Ali Afshnars special purpose `pytest-yamlwsgi`_ plugin).   This ``conftest.py`` will  collect ``test*.yaml`` files and will execute the yaml-formatted content as custom tests: | ||||||
| 
 | 
 | ||||||
| .. include:: nonpython/conftest.py | .. include:: nonpython/conftest.py | ||||||
|     :literal: |     :literal: | ||||||
| 
 | 
 | ||||||
| You can create a simple example file: | You can create a simple example file: | ||||||
| 
 | 
 | ||||||
| .. include:: nonpython/test_simple.yml | .. include:: nonpython/test_simple.yaml | ||||||
|     :literal: |     :literal: | ||||||
| 
 | 
 | ||||||
| and if you installed `PyYAML`_ or a compatible YAML-parser you can | and if you installed `PyYAML`_ or a compatible YAML-parser you can | ||||||
|  | @ -27,14 +27,14 @@ now execute the test specification: | ||||||
| 
 | 
 | ||||||
| .. code-block:: pytest | .. code-block:: pytest | ||||||
| 
 | 
 | ||||||
|     nonpython $ pytest test_simple.yml |     nonpython $ pytest test_simple.yaml | ||||||
|     =========================== test session starts ============================ |     =========================== test session starts ============================ | ||||||
|     platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y |     platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y | ||||||
|     cachedir: $PYTHON_PREFIX/.pytest_cache |     cachedir: $PYTHON_PREFIX/.pytest_cache | ||||||
|     rootdir: $REGENDOC_TMPDIR/nonpython |     rootdir: $REGENDOC_TMPDIR/nonpython | ||||||
|     collected 2 items |     collected 2 items | ||||||
| 
 | 
 | ||||||
|     test_simple.yml F.                                                   [100%] |     test_simple.yaml F.                                                   [100%] | ||||||
| 
 | 
 | ||||||
|     ================================= FAILURES ================================= |     ================================= FAILURES ================================= | ||||||
|     ______________________________ usecase: hello ______________________________ |     ______________________________ usecase: hello ______________________________ | ||||||
|  | @ -69,8 +69,8 @@ consulted when reporting in ``verbose`` mode: | ||||||
|     rootdir: $REGENDOC_TMPDIR/nonpython |     rootdir: $REGENDOC_TMPDIR/nonpython | ||||||
|     collecting ... collected 2 items |     collecting ... collected 2 items | ||||||
| 
 | 
 | ||||||
|     test_simple.yml::hello FAILED                                        [ 50%] |     test_simple.yaml::hello FAILED                                        [ 50%] | ||||||
|     test_simple.yml::ok PASSED                                           [100%] |     test_simple.yaml::ok PASSED                                           [100%] | ||||||
| 
 | 
 | ||||||
|     ================================= FAILURES ================================= |     ================================= FAILURES ================================= | ||||||
|     ______________________________ usecase: hello ______________________________ |     ______________________________ usecase: hello ______________________________ | ||||||
|  | @ -93,7 +93,7 @@ interesting to just look at the collection tree: | ||||||
|     rootdir: $REGENDOC_TMPDIR/nonpython |     rootdir: $REGENDOC_TMPDIR/nonpython | ||||||
|     collected 2 items |     collected 2 items | ||||||
|     <Package $REGENDOC_TMPDIR/nonpython> |     <Package $REGENDOC_TMPDIR/nonpython> | ||||||
|       <YamlFile test_simple.yml> |       <YamlFile test_simple.yaml> | ||||||
|         <YamlItem hello> |         <YamlItem hello> | ||||||
|         <YamlItem ok> |         <YamlItem ok> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ import pytest | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def pytest_collect_file(parent, path): | def pytest_collect_file(parent, path): | ||||||
|     if path.ext == ".yml" and path.basename.startswith("test"): |     if path.ext == ".yaml" and path.basename.startswith("test"): | ||||||
|         return YamlFile(path, parent) |         return YamlFile(path, parent) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| # test_simple.yml | # test_simple.yaml | ||||||
| ok: | ok: | ||||||
|     sub1: sub1 |     sub1: sub1 | ||||||
| 
 | 
 | ||||||
		Loading…
	
		Reference in New Issue