Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pytest.config deprecation warning #2677

Merged
merged 1 commit into from
May 9, 2019

Conversation

jrbourbeau
Copy link
Member

This PR replaces all occurrences of distributed.utils_test.slow with pytest.mark.slow.

Fixes #2669

@mrocklin
Copy link
Member

mrocklin commented May 9, 2019

Thanks @jrbourbeau !

@mrocklin mrocklin merged commit 22c733e into dask:master May 9, 2019
@jrbourbeau jrbourbeau deleted the pytest-warning branch May 10, 2019 04:09
QuLogic pushed a commit to QuLogic/distributed that referenced this pull request May 15, 2019
muammar added a commit to muammar/distributed that referenced this pull request Jul 18, 2019
* upstream/master:
  Add WeakSet _instances attributes to all classes (dask#2673)
  Cap worker's memory limit by the hard limit of the maximum resident memory (dask#2665)
  Switch from (ip, port) to address in tests (dask#2684)
  Catch RuntimeError to avoid serialization fail when using pytorch (dask#2619)
  Add CONTRIBUTING.md (dask#2680)
  Consolidate logic around services (dask#2679)
  Fix uri_from_host_port import in dask-mpi (dask#2683)
  Move dashboard_address logic into Scheduler/Worker (dask#2678)
  Fix pytest.config deprecation warning (dask#2677)
  Use config accessor method for "scheduler-address" (dask#2676)
  Add memory and disk aliases to Worker.data (dask#2670)
  Move interface/host/port handling from CLI to classes (dask#2667)
  Remove AioClient (dask#2668)
  Add release procedure doc (dask#2672)
  bump version to 1.28.0
Lnaden added a commit to Lnaden/QCFractal that referenced this pull request Aug 20, 2019
This PR makes an overhaul to the nuances of our PyTest framework.

* In order to ship around the testing configuration (the contents of
  `conftest.py`), this PR ports all of those features to the `testing.py`
  file which is now treated as a first class PyTest Plugin.
* The `pytest11` entry point for the `testing.py` file has been added
  to the `setup.py` file so it will be detected automatically by any
  installed PyTest, allowing transferring of the `--runslow` and
  `--runexamples` CLI flags into PyTest on its own.
    * This also enables the ability to access these flags anywhere
* Due to the removal of the [pytest.config global](https://docs.pytest.org/en/latest/deprecations.html#pytest-config-global) in the Version 5+ of PyTest, I had to
  rework how some of our `mark` functions behave. Instead of writing
  our own decorators, I instead am using the PyTest recommended method
  of `pytest_collection_modifyitems`, an example of which can be found
  [here](https://docs.pytest.org/en/latest/example/simple.html#control-skipping-of-tests-according-to-command-line-option).
  I have also based this off the implementation this from Dask Distributed
  dask/distributed#2677.
* Due to the previous change, the `mark_slow` and `mark_example`
  decorators are no more. We now just use `pytest.mark.slow` and
  `pytest.mark.example` respectively. This change has been propagated
  through the tests.
* I fixed a bug in the `test_visualization` where the `_has_plotly` flag
  was always being set to `True`.
* I have tested this with both PyTest 5 and PyTest 4.6.3

And finally, all of this, was so we could install QCFractal and run
`pytest --pyargs qcfractal` from anywhere and still have access to the
optional `--runslow` flag (and it solved a PyTest 5 deprecation)
QCArchiveBot pushed a commit to MolSSI/QCPortal that referenced this pull request Aug 20, 2019
This PR makes an overhaul to the nuances of our PyTest framework.

* In order to ship around the testing configuration (the contents of
  `conftest.py`), this PR ports all of those features to the `testing.py`
  file which is now treated as a first class PyTest Plugin.
* The `pytest11` entry point for the `testing.py` file has been added
  to the `setup.py` file so it will be detected automatically by any
  installed PyTest, allowing transferring of the `--runslow` and
  `--runexamples` CLI flags into PyTest on its own.
    * This also enables the ability to access these flags anywhere
* Due to the removal of the [pytest.config global](https://docs.pytest.org/en/latest/deprecations.html#pytest-config-global) in the Version 5+ of PyTest, I had to
  rework how some of our `mark` functions behave. Instead of writing
  our own decorators, I instead am using the PyTest recommended method
  of `pytest_collection_modifyitems`, an example of which can be found
  [here](https://docs.pytest.org/en/latest/example/simple.html#control-skipping-of-tests-according-to-command-line-option).
  I have also based this off the implementation this from Dask Distributed
  dask/distributed#2677.
* Due to the previous change, the `mark_slow` and `mark_example`
  decorators are no more. We now just use `pytest.mark.slow` and
  `pytest.mark.example` respectively. This change has been propagated
  through the tests.
* I fixed a bug in the `test_visualization` where the `_has_plotly` flag
  was always being set to `True`.
* I have tested this with both PyTest 5 and PyTest 4.6.3

And finally, all of this, was so we could install QCFractal and run
`pytest --pyargs qcfractal` from anywhere and still have access to the
optional `--runslow` flag (and it solved a PyTest 5 deprecation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pytest 4 deprecation warning on pytest.config
2 participants