Metadata-Version: 1.1
Name: pytest-mockito
Version: 0.0.2
Summary: Base fixtures for mockito
Home-page: https://github.com/kaste/pytest-mockito
Author: herr kaste
Author-email: herr.kaste@gmail.com
License: MIT
Description: Convenience plugin on top of mockito.
        
        .. image:: https://travis-ci.org/kaste/pytest-mockito.svg?branch=master
            :target: https://travis-ci.org/kaste/pytest-mockito
        
        Install
        =======
        
        ``pip install pytest-mockito``
        
        After that the plugin is enabled by default.
        
        
        Fixtures
        ========
        
        The plugin provides fixtures for the main entrypoints of mockito which guarantee that you `unstub()` on teardown. Usage is *very* simple and straightforward::
        
        
            def test_foo(when):
                when(os.path).exists('/foo').thenReturn(False)
                assert os.path.exists('/foo')  # sic!
                # will still unstub/unpatch bc pytest will run the teardown
        
        You can also use a marker. `usefixtures` here will ensure an `unstub` at the end of each test, but does not actually inject the fixture::
        
            import pytest
        
            @pytest.mark.usefixtures('unstub')
            class TestDog:
                def test(self):
                    ...
        
        
        All of the following fixtures just export the equivalent mockito function but `unstub()` on teardown. The exception here is `expect` which also calls `verifyNoUnwantedInteractions()`::
        
            when
            when2
            expect
            patch
            unstub
            spy2
        
        
        
        
Platform: linux
Platform: osx
Platform: win32
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python
