Change deprecation type of --result-log to PytestDeprecationWarning
It was decided to deprecate this on a later date (see discussion in #4447)
This commit is contained in:
		
							parent
							
								
									06dc6e3490
								
							
						
					
					
						commit
						b05061dcd2
					
				|  | @ -0,0 +1,3 @@ | ||||||
|  | Changed the deprecation type of ``--result-log`` to ``PytestDeprecationWarning``. | ||||||
|  | 
 | ||||||
|  | It was decided to remove this feature at the next major revision. | ||||||
|  | @ -303,6 +303,10 @@ Result log (``--result-log``) | ||||||
| The ``--resultlog`` command line option has been deprecated: it is little used | The ``--resultlog`` command line option has been deprecated: it is little used | ||||||
| and there are more modern and better alternatives, for example `pytest-tap <https://tappy.readthedocs.io/en/latest/>`_. | and there are more modern and better alternatives, for example `pytest-tap <https://tappy.readthedocs.io/en/latest/>`_. | ||||||
| 
 | 
 | ||||||
|  | This feature will be effectively removed in pytest 4.0 as the team intends to include a better alternative in the core. | ||||||
|  | 
 | ||||||
|  | If you have any concerns, please don't hesitate to `open an issue <https://github.com/pytest-dev/pytest/issues>`__. | ||||||
|  | 
 | ||||||
| Removed Features | Removed Features | ||||||
| ---------------- | ---------------- | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -483,14 +483,10 @@ Creating resultlog format files | ||||||
| 
 | 
 | ||||||
| .. deprecated:: 3.0 | .. deprecated:: 3.0 | ||||||
| 
 | 
 | ||||||
|     This option is rarely used and is scheduled for removal in 4.0. |     This option is rarely used and is scheduled for removal in 5.0. | ||||||
| 
 | 
 | ||||||
|     An alternative for users which still need similar functionality is to use the |     See `the deprecation docs <https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log>`__ | ||||||
|     `pytest-tap <https://pypi.org/project/pytest-tap/>`_ plugin which provides |     for more information. | ||||||
|     a stream of test data. |  | ||||||
| 
 |  | ||||||
|     If you have any concerns, please don't hesitate to |  | ||||||
|     `open an issue <https://github.com/pytest-dev/pytest/issues>`_. |  | ||||||
| 
 | 
 | ||||||
| To create plain-text machine-readable result files you can issue:: | To create plain-text machine-readable result files you can issue:: | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -56,9 +56,9 @@ GETFUNCARGVALUE = RemovedInPytest4Warning( | ||||||
|     "getfuncargvalue is deprecated, use getfixturevalue" |     "getfuncargvalue is deprecated, use getfixturevalue" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| RESULT_LOG = RemovedInPytest4Warning( | RESULT_LOG = PytestDeprecationWarning( | ||||||
|     "--result-log is deprecated and scheduled for removal in pytest 4.0.\n" |     "--result-log is deprecated and scheduled for removal in pytest 5.0.\n" | ||||||
|     "See https://docs.pytest.org/en/latest/usage.html#creating-resultlog-format-files for more information." |     "See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information." | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| MARK_INFO_ATTRIBUTE = RemovedInPytest4Warning( | MARK_INFO_ATTRIBUTE = RemovedInPytest4Warning( | ||||||
|  |  | ||||||
|  | @ -120,8 +120,8 @@ def test_resultlog_is_deprecated(testdir): | ||||||
|     result = testdir.runpytest("--result-log=%s" % testdir.tmpdir.join("result.log")) |     result = testdir.runpytest("--result-log=%s" % testdir.tmpdir.join("result.log")) | ||||||
|     result.stdout.fnmatch_lines( |     result.stdout.fnmatch_lines( | ||||||
|         [ |         [ | ||||||
|             "*--result-log is deprecated and scheduled for removal in pytest 4.0*", |             "*--result-log is deprecated and scheduled for removal in pytest 5.0*", | ||||||
|             "*See https://docs.pytest.org/en/latest/usage.html#creating-resultlog-format-files for more information*", |             "*See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information*", | ||||||
|         ] |         ] | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue