pytest-twisted icon indicating copy to clipboard operation
pytest-twisted copied to clipboard

What is the public interface? (let me know what you actually use)

Open altendky opened this issue 6 years ago • 4 comments
trafficstars

With everything in one file, being a module distribution (rather than package), and having only the readme as documentation I'm left a little unclear about what is 'public interface' and what isn't. I'd like to make this more explicit so that going forward we don't have to think about this on a case by case basis every time we feel like tweaking something. (also, maybe I want a package with versioneer and explicit public interface and tests inside like I'm used to...)

The readme references:

  • pytest options
    • -p no:twisted
    • --reactor
  • pytest fixtures
    • twisted_greenlet
  • import pytest
    • Not in the readme anymore but they were as of v1.6 (2018.01.11) and have no deprecation notices
    • @inlineCallbacks
    • blockon()
  • import pytest_twisted
    • init_default_reactor()
    • init_qt5_reactor()
    • @pytest_twisted.inlineCallbacks
    • blockon()

The remaining items are:

  • 'public'
    • blockon_default()
    • block_from_thread()
    • init_twisted_greenlet()
    • stop_twisted_greenlet()
    • reactor_installers
  • 'private'
    • _config
    • _instances
    • _install_reactor()
  • pytest_*
    • pytest_pyfunc_call()
    • pytest_addoption()
    • pytest_configure()
    • _pytest_pyfunc_call()

altendky avatar Jan 15 '19 04:01 altendky

I use pytest.inlineCallbacks and pytest.blockon

meejah avatar Jan 15 '19 04:01 meejah

https://github.com/glyph/publication/

altendky avatar Jan 15 '19 15:01 altendky

I use

from pytest_twisted import inlineCallbacks

ThreePinkApples avatar Jan 16 '19 14:01 ThreePinkApples

I use @pytest_twisted.inlineCallbacks and pytest_twisted.blockon(deferred)

ktdreyer avatar Jan 21 '19 17:01 ktdreyer