parent
							
								
									155ffa07de
								
							
						
					
					
						commit
						87daedd719
					
				|  | @ -1,10 +1,10 @@ | |||
| Changes between 1.0.0b7 and 1.0.0b8 | ||||
| ===================================== | ||||
| 
 | ||||
| * pytest_unittest-plugin are now enabled by default | ||||
| * pytest_unittest-plugin is now enabled by default | ||||
| 
 | ||||
| * introduced pytest_keyboardinterrupt hook and  | ||||
|   refined pytest_sessionfinish hooked.  | ||||
|   refined pytest_sessionfinish hooked, added tests.  | ||||
| 
 | ||||
| * workaround a buggy logging module interaction ("closing already closed | ||||
|   files").  Thanks to Sridhar Ratnakumar for triggering.  | ||||
|  | @ -13,9 +13,8 @@ Changes between 1.0.0b7 and 1.0.0b8 | |||
|   a dependency only a warning will be issued instead  | ||||
|   of exiting the testing process.  | ||||
| 
 | ||||
| * docs:  | ||||
|   - refined funcargs doc , use the term "factory" instead  | ||||
|     of "provider" | ||||
| * many improvements to docs:  | ||||
|   - refined funcargs doc , use the term "factory" instead of "provider" | ||||
|   - added a new talk/tutorial doc page  | ||||
|   - better download page | ||||
|   - better plugin docstrings | ||||
|  |  | |||
							
								
								
									
										22
									
								
								MANIFEST
								
								
								
								
							
							
						
						
									
										22
									
								
								MANIFEST
								
								
								
								
							|  | @ -28,7 +28,25 @@ doc/test/examples.txt | |||
| doc/test/extend.txt | ||||
| doc/test/features.txt | ||||
| doc/test/funcargs.txt | ||||
| doc/test/plugins.txt | ||||
| doc/test/plugin/doctest.txt | ||||
| doc/test/plugin/execnetcleanup.txt | ||||
| doc/test/plugin/figleaf.txt | ||||
| doc/test/plugin/hooklog.txt | ||||
| doc/test/plugin/hookspec.txt | ||||
| doc/test/plugin/index.txt | ||||
| doc/test/plugin/iocapture.txt | ||||
| doc/test/plugin/keyword.txt | ||||
| doc/test/plugin/monkeypatch.txt | ||||
| doc/test/plugin/pdb.txt | ||||
| doc/test/plugin/pocoo.txt | ||||
| doc/test/plugin/pytester.txt | ||||
| doc/test/plugin/recwarn.txt | ||||
| doc/test/plugin/restdoc.txt | ||||
| doc/test/plugin/resultlog.txt | ||||
| doc/test/plugin/runner.txt | ||||
| doc/test/plugin/terminal.txt | ||||
| doc/test/plugin/unittest.txt | ||||
| doc/test/plugin/xfail.txt | ||||
| doc/test/quickstart.txt | ||||
| doc/test/talks.txt | ||||
| doc/test/test.txt | ||||
|  | @ -340,6 +358,7 @@ py/test/plugin/pytest_unittest.py | |||
| py/test/plugin/pytest_xfail.py | ||||
| py/test/plugin/test_pytest_runner.py | ||||
| py/test/plugin/test_pytest_runner_xunit.py | ||||
| py/test/plugin/test_pytest_terminal.py | ||||
| py/test/pluginmanager.py | ||||
| py/test/pycollect.py | ||||
| py/test/session.py | ||||
|  | @ -358,6 +377,7 @@ py/test/testing/test_conftesthandle.py | |||
| py/test/testing/test_deprecated_api.py | ||||
| py/test/testing/test_funcargs.py | ||||
| py/test/testing/test_genitems.py | ||||
| py/test/testing/test_install.py | ||||
| py/test/testing/test_outcome.py | ||||
| py/test/testing/test_parseopt.py | ||||
| py/test/testing/test_pickling.py | ||||
|  |  | |||
|  | @ -233,7 +233,7 @@ For your convenience here is also an inlined version of ``pytest_doctest.py``: | |||
|                 "*test_txtfile_failing.txt:2: DocTestFailure" | ||||
|             ]) | ||||
| 
 | ||||
| .. _`pytest_doctest.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_doctest.py | ||||
| .. _`pytest_doctest.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_doctest.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -79,7 +79,7 @@ For your convenience here is also an inlined version of ``pytest_execnetcleanup. | |||
|         """, "-s", "--debug") | ||||
|         reprec.assertoutcome(passed=2) | ||||
| 
 | ||||
| .. _`pytest_execnetcleanup.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_execnetcleanup.py | ||||
| .. _`pytest_execnetcleanup.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_execnetcleanup.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -103,7 +103,7 @@ For your convenience here is also an inlined version of ``pytest_figleaf.py``: | |||
|             ]) | ||||
|         #print result.stdout.str() | ||||
| 
 | ||||
| .. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_figleaf.py | ||||
| .. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_figleaf.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -65,7 +65,7 @@ For your convenience here is also an inlined version of ``pytest_hooklog.py``: | |||
|         assert s.find("ItemTestReport") != -1 | ||||
|         assert s.find("sessionfinish") != -1 | ||||
| 
 | ||||
| .. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_hooklog.py | ||||
| .. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_hooklog.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -164,7 +164,7 @@ For your convenience here is also an inlined version of ``pytest_iocapture.py``: | |||
|             """) | ||||
|             reprec.assertoutcome(passed=1) | ||||
| 
 | ||||
| .. _`pytest_iocapture.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_iocapture.py | ||||
| .. _`pytest_iocapture.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_iocapture.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -103,7 +103,7 @@ For your convenience here is also an inlined version of ``pytest_keyword.py``: | |||
|         result = testdir.runpytest(p) | ||||
|         assert result.stdout.fnmatch_lines(["*passed*"]) | ||||
| 
 | ||||
| .. _`pytest_keyword.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_keyword.py | ||||
| .. _`pytest_keyword.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_keyword.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -182,7 +182,7 @@ For your convenience here is also an inlined version of ``pytest_monkeypatch.py` | |||
|         res = reprec.countoutcomes() | ||||
|         assert tuple(res) == (1, 0, 0), res | ||||
| 
 | ||||
| .. _`pytest_monkeypatch.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_monkeypatch.py | ||||
| .. _`pytest_monkeypatch.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_monkeypatch.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -185,7 +185,7 @@ For your convenience here is also an inlined version of ``pytest_pdb.py``: | |||
|             if child.isalive():  | ||||
|                 child.wait() | ||||
| 
 | ||||
| .. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_pdb.py | ||||
| .. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_pdb.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							|  | @ -18,6 +18,13 @@ XXX missing docstring | |||
| the 'reportrecorder' test function argument | ||||
| ------------------------------------------- | ||||
| 
 | ||||
| XXX missing docstring | ||||
| .. _`venv funcarg`: | ||||
| 
 | ||||
| 
 | ||||
| the 'venv' test function argument | ||||
| --------------------------------- | ||||
| 
 | ||||
| XXX missing docstring | ||||
| .. _`linecomp funcarg`: | ||||
| 
 | ||||
|  | @ -25,6 +32,13 @@ XXX missing docstring | |||
| the 'linecomp' test function argument | ||||
| ------------------------------------- | ||||
| 
 | ||||
| XXX missing docstring | ||||
| .. _`py_setup funcarg`: | ||||
| 
 | ||||
| 
 | ||||
| the 'py_setup' test function argument | ||||
| ------------------------------------- | ||||
| 
 | ||||
| XXX missing docstring | ||||
| .. _`LineMatcher funcarg`: | ||||
| 
 | ||||
|  | @ -61,6 +75,7 @@ For your convenience here is also an inlined version of ``pytest_pytester.py``: | |||
|     import inspect | ||||
|     from py.__.test.config import Config as pytestConfig | ||||
|     import hookspec | ||||
|     import subprocess | ||||
|      | ||||
|     pytest_plugins = '_pytest' | ||||
|      | ||||
|  | @ -561,7 +576,107 @@ For your convenience here is also an inlined version of ``pytest_pytester.py``: | |||
|             "*1 passed*" | ||||
|         ]) | ||||
|      | ||||
| .. _`pytest_pytester.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_pytester.py | ||||
|     # | ||||
|     # experimental funcargs for venv/install-tests | ||||
|     # | ||||
|      | ||||
|     def pytest_funcarg__venv(request): | ||||
|         p = request.config.mktemp(request.function.__name__, numbered=True) | ||||
|         venv = VirtualEnv(str(p))  | ||||
|         venv.create() | ||||
|         return venv  | ||||
|         | ||||
|     def pytest_funcarg__py_setup(request): | ||||
|         rootdir = py.path.local(py.__file__).dirpath().dirpath() | ||||
|         setup = rootdir.join('setup.py') | ||||
|         if not setup.check(): | ||||
|             py.test.skip("not found: %r" % setup) | ||||
|         return SetupBuilder(setup) | ||||
|      | ||||
|     class SetupBuilder: | ||||
|         def __init__(self, setup_path): | ||||
|             self.setup_path = setup_path | ||||
|      | ||||
|         def make_sdist(self, destdir=None): | ||||
|             temp = py.path.local.mkdtemp() | ||||
|             try: | ||||
|                 args = ['python', str(self.setup_path), 'sdist',  | ||||
|                         '--dist-dir', str(temp)] | ||||
|                 subprocess.check_call(args) | ||||
|                 l = temp.listdir('py-*') | ||||
|                 assert len(l) == 1 | ||||
|                 sdist = l[0] | ||||
|                 if destdir is None: | ||||
|                     destdir = self.setup_path.dirpath('build') | ||||
|                     assert destdir.check() | ||||
|                 else: | ||||
|                     destdir = py.path.local(destdir) | ||||
|                 target = destdir.join(sdist.basename) | ||||
|                 sdist.copy(target) | ||||
|                 return target  | ||||
|             finally: | ||||
|                 temp.remove() | ||||
|      | ||||
|     # code taken from Ronny Pfannenschmidt's virtualenvmanager  | ||||
|      | ||||
|     class VirtualEnv(object): | ||||
|         def __init__(self, path): | ||||
|             #XXX: supply the python executable | ||||
|             self.path = path | ||||
|      | ||||
|         def __repr__(self): | ||||
|             return "<VirtualEnv at %r>" %(self.path) | ||||
|      | ||||
|         def _cmd(self, name): | ||||
|             return os.path.join(self.path, 'bin', name) | ||||
|      | ||||
|         @property | ||||
|         def valid(self): | ||||
|             return os.path.exists(self._cmd('python')) | ||||
|      | ||||
|         def create(self, sitepackages=False): | ||||
|             args = ['virtualenv', self.path] | ||||
|             if not sitepackages: | ||||
|                 args.append('--no-site-packages') | ||||
|             subprocess.check_call(args) | ||||
|      | ||||
|         def makegateway(self): | ||||
|             python = self._cmd('python') | ||||
|             return py.execnet.makegateway("popen//python=%s" %(python,)) | ||||
|      | ||||
|         def pcall(self, cmd, *args, **kw): | ||||
|             assert self.valid | ||||
|             return subprocess.call([ | ||||
|                     self._cmd(cmd) | ||||
|                 ] + list(args), | ||||
|                 **kw) | ||||
|      | ||||
|      | ||||
|         def easy_install(self, *packages, **kw): | ||||
|             args = [] | ||||
|             if 'index' in kw: | ||||
|                 index = kw['index'] | ||||
|                 if isinstance(index, (list, tuple)): | ||||
|                     for i in index: | ||||
|                         args.extend(['-i', i]) | ||||
|                 else: | ||||
|                     args.extend(['-i', index]) | ||||
|      | ||||
|             args.extend(packages) | ||||
|             self.pcall('easy_install', *args) | ||||
|      | ||||
|      | ||||
|         @property | ||||
|         def has_pip(self): | ||||
|             return os.path.exists(self._cmd('pip')) | ||||
|      | ||||
|         def pip_install(self, *packages): | ||||
|             if not self.has_pip: | ||||
|                 self.easy_install('pip') | ||||
|      | ||||
|             self.pcall('pip', *packages) | ||||
| 
 | ||||
| .. _`pytest_pytester.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_pytester.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -204,7 +204,7 @@ For your convenience here is also an inlined version of ``pytest_recwarn.py``: | |||
|         py.test.deprecated_call(dep_explicit, 0) | ||||
|         py.test.deprecated_call(dep_explicit, 0) | ||||
| 
 | ||||
| .. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_recwarn.py | ||||
| .. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_recwarn.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -524,7 +524,7 @@ For your convenience here is also an inlined version of ``pytest_restdoc.py``: | |||
|             assert not failed  | ||||
|             assert skipped <= 1 | ||||
| 
 | ||||
| .. _`pytest_restdoc.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_restdoc.py | ||||
| .. _`pytest_restdoc.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_restdoc.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -274,7 +274,7 @@ For your convenience here is also an inlined version of ``pytest_resultlog.py``: | |||
|             "s *:test_skip",  | ||||
|         ]) | ||||
| 
 | ||||
| .. _`pytest_resultlog.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_resultlog.py | ||||
| .. _`pytest_resultlog.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_resultlog.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -297,7 +297,7 @@ For your convenience here is also an inlined version of ``pytest_runner.py``: | |||
|                 col.setup()  | ||||
|                 self.stack.append(col)  | ||||
| 
 | ||||
| .. _`pytest_runner.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_runner.py | ||||
| .. _`pytest_runner.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_runner.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -425,7 +425,7 @@ For your convenience here is also an inlined version of ``pytest_terminal.py``: | |||
|         except (TypeError, ValueError): | ||||
|             return str(v) | ||||
| 
 | ||||
| .. _`pytest_terminal.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_terminal.py | ||||
| .. _`pytest_terminal.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_terminal.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -155,7 +155,7 @@ For your convenience here is also an inlined version of ``pytest_unittest.py``: | |||
|         assert passed == 2 | ||||
|         assert passed + skipped + failed == 2 | ||||
| 
 | ||||
| .. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_unittest.py | ||||
| .. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_unittest.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
|  | @ -127,7 +127,7 @@ For your convenience here is also an inlined version of ``pytest_xfail.py``: | |||
|         ]) | ||||
|         assert result.ret == 1 | ||||
| 
 | ||||
| .. _`pytest_xfail.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_xfail.py | ||||
| .. _`pytest_xfail.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_xfail.py | ||||
| .. _`extend`: ../extend.html | ||||
| .. _`plugins`: index.html | ||||
| .. _`contact`: ../../contact.html | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue