2010-09-26 22:23:44 +08:00
|
|
|
checks / deprecations for next release
|
|
|
|
---------------------------------------------------------------
|
|
|
|
tags: bug 1.4 core xdist
|
|
|
|
|
|
|
|
* reportinfo -> location in hooks and items
|
|
|
|
* check oejskit plugin compatibility
|
2010-09-28 21:24:36 +08:00
|
|
|
* terminal reporting - dot-printing
|
|
|
|
* some simple profiling
|
2010-09-26 22:23:44 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
refine session initialization / fix custom collect crash
|
2010-05-01 02:03:57 +08:00
|
|
|
---------------------------------------------------------------
|
2010-07-27 03:15:15 +08:00
|
|
|
tags: bug 1.4 core xdist
|
2010-05-01 02:03:57 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
When calling "py.test path/X" py.test can crash if the collection
|
2010-05-01 02:03:57 +08:00
|
|
|
of that directory is skipped. Calling "py.test path" will give
|
2010-07-27 03:15:15 +08:00
|
|
|
proper output. The reason is that for the very first colitems
|
|
|
|
getinitialnodes() and a collection is done before the fully
|
|
|
|
controlled session and pytest_make_collect_report protocol takes over.
|
2010-05-01 02:03:57 +08:00
|
|
|
Try to remove the redundant getinitialnodes related logic and amend
|
2010-07-27 03:15:15 +08:00
|
|
|
the session collect logic to care for this "initial" case as well.
|
2010-05-01 02:03:57 +08:00
|
|
|
Apart from simplification a side effect the dsession's session
|
2010-07-27 03:15:15 +08:00
|
|
|
and the core session probably converge some more.
|
2009-11-26 02:50:39 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
do early-teardown of test modules
|
2010-07-27 02:54:34 +08:00
|
|
|
-----------------------------------------
|
|
|
|
tags: feature 1.3
|
|
|
|
|
|
|
|
currently teardowns are called when the next tests is setup
|
2010-07-27 03:15:15 +08:00
|
|
|
except for the function/method level where interally
|
2010-07-27 02:54:34 +08:00
|
|
|
"teardown_exact" tears down immediately. Generalize
|
|
|
|
this to perform the "neccessary" teardown compared to
|
|
|
|
the "next" test item during teardown - this should
|
2010-07-27 03:15:15 +08:00
|
|
|
get rid of some irritations because otherwise e.g.
|
|
|
|
prints of teardown-code appear in the setup of the next test.
|
2010-07-27 02:54:34 +08:00
|
|
|
|
|
|
|
consider and document __init__ file usage in test directories
|
|
|
|
---------------------------------------------------------------
|
2010-07-27 03:15:15 +08:00
|
|
|
tags: bug 1.4 core
|
2010-07-27 02:54:34 +08:00
|
|
|
|
|
|
|
Currently, a test module is imported with its fully qualified
|
2010-07-27 03:15:15 +08:00
|
|
|
package path, determined by checking __init__ files upwards.
|
|
|
|
This has the side effect that a source package at the root
|
2010-07-27 02:54:34 +08:00
|
|
|
of the test dir could be imported as well. This is somewhat
|
|
|
|
convenient but complicates the picture for running tests against
|
2010-07-27 03:15:15 +08:00
|
|
|
different versions of a package. Also, implicit sys.path
|
2010-07-27 02:54:34 +08:00
|
|
|
manipulations are problematic per-se. Maybe factorting out
|
|
|
|
a pytest_addsyspath hook which can be disabled from the command line
|
2010-07-27 03:15:15 +08:00
|
|
|
makes sense. In any case documentation/recommendations for
|
|
|
|
certain scenarios makes sense.
|
2010-07-27 02:54:34 +08:00
|
|
|
|
|
|
|
relax requirement to have tests/testing contain an __init__
|
|
|
|
----------------------------------------------------------------
|
|
|
|
tags: feature 1.4
|
|
|
|
bb: http://bitbucket.org/hpk42/py-trunk/issue/64
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
A local test run of a "tests" directory may work
|
2010-07-27 02:54:34 +08:00
|
|
|
but a remote one fail because the tests directory
|
|
|
|
does not contain an "__init__.py". Either give
|
|
|
|
an error or make it work without the __init__.py
|
2010-07-27 03:15:15 +08:00
|
|
|
i.e. port the nose-logic of unloading a test module.
|
2010-07-27 02:54:34 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
customize test function collection
|
2009-11-26 02:50:39 +08:00
|
|
|
-------------------------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: feature 1.4
|
2009-11-26 02:50:39 +08:00
|
|
|
|
2010-07-27 02:54:34 +08:00
|
|
|
- introduce py.test.mark.nocollect for not considering a function for
|
|
|
|
test collection at all. maybe also introduce a py.test.mark.test to
|
|
|
|
explicitely mark a function to become a tested one. Lookup JUnit ways
|
2010-07-27 03:15:15 +08:00
|
|
|
of tagging tests.
|
2010-07-27 02:54:34 +08:00
|
|
|
|
|
|
|
- allow an easy way to customize "test_", "Test" prefixes for file paths
|
|
|
|
and test function/class names. the current customizable Item requires
|
2010-07-27 03:15:15 +08:00
|
|
|
too much code/concepts to influence this collection matching.
|
2010-07-27 02:54:34 +08:00
|
|
|
maybe introduce pytest_pycollect_filters = {
|
2010-07-27 03:15:15 +08:00
|
|
|
'file': 'test*.py',
|
|
|
|
'function': 'test*',
|
|
|
|
'class': 'Test*',
|
2010-07-27 02:54:34 +08:00
|
|
|
}
|
2009-12-21 05:11:36 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
introduce py.test.mark.platform
|
2010-06-08 18:29:15 +08:00
|
|
|
-------------------------------------------------------
|
|
|
|
tags: feature 1.4
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
Introduce nice-to-spell platform-skipping, examples:
|
2010-06-08 18:29:15 +08:00
|
|
|
|
|
|
|
@py.test.mark.platform("python3")
|
|
|
|
@py.test.mark.platform("not python3")
|
|
|
|
@py.test.mark.platform("win32 and not python3")
|
|
|
|
@py.test.mark.platform("darwin")
|
|
|
|
@py.test.mark.platform("not (jython and win32)")
|
|
|
|
@py.test.mark.platform("not (jython and win32)", xfail=True)
|
|
|
|
|
|
|
|
etc. Idea is to allow Python expressions which can operate
|
2010-07-27 03:15:15 +08:00
|
|
|
on common spellings for operating systems and python
|
|
|
|
interpreter versions.
|
2010-06-08 18:29:15 +08:00
|
|
|
|
2010-02-07 09:55:50 +08:00
|
|
|
introduce py.test.mark registration
|
|
|
|
-----------------------------------------
|
2010-07-27 02:54:34 +08:00
|
|
|
tags: feature 1.4
|
2010-02-07 09:55:50 +08:00
|
|
|
|
|
|
|
introduce a hook that allows to register a named mark decorator
|
|
|
|
with documentation and add "py.test --marks" to get
|
|
|
|
a list of available marks. Deprecate "dynamic" mark
|
2010-07-27 03:15:15 +08:00
|
|
|
definitions.
|
2010-02-07 09:55:50 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
allow to non-intrusively apply skipfs/xfail/marks
|
2010-07-27 02:54:34 +08:00
|
|
|
---------------------------------------------------
|
|
|
|
tags: feature 1.4
|
2010-02-10 01:32:17 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
use case: mark a module or directory structures
|
|
|
|
to be skipped on certain platforms (i.e. no import
|
|
|
|
attempt will be made).
|
2010-07-27 02:54:34 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
consider introducing a hook/mechanism that allows to apply marks
|
|
|
|
from conftests or plugins.
|
2010-02-10 01:32:17 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
explicit referencing of conftest.py files
|
2010-02-10 01:32:17 +08:00
|
|
|
-----------------------------------------
|
2010-07-27 02:54:34 +08:00
|
|
|
tags: feature 1.4
|
2010-02-10 01:32:17 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
allow to name conftest.py files (in sub directories) that should
|
|
|
|
be imported early, as to include command line options.
|
2010-02-10 01:32:17 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
a central py.test ini/yml file
|
2010-07-27 02:54:34 +08:00
|
|
|
----------------------------------
|
|
|
|
tags: feature 1.4
|
|
|
|
|
|
|
|
introduce a declarative configuration file that allows:
|
2010-07-27 03:15:15 +08:00
|
|
|
- default options
|
|
|
|
- to-be-collected test directories
|
2010-07-27 02:54:34 +08:00
|
|
|
- required plugins
|
2010-07-27 03:15:15 +08:00
|
|
|
- test func/class/file matching patterns
|
|
|
|
- skip/xfail (non-intrusive)
|
|
|
|
- pytest.ini and tox.ini and setup.cfg configuration in the same file
|
2010-07-27 02:54:34 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
new documentation
|
2010-07-27 02:54:34 +08:00
|
|
|
----------------------------------
|
|
|
|
tags: feature 1.4
|
2010-02-07 09:55:50 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- logo py.test
|
|
|
|
- reference / customization
|
2010-07-27 02:54:34 +08:00
|
|
|
- writing a (local or global) plugin
|
2010-07-27 03:15:15 +08:00
|
|
|
- examples for unittest or functional testing
|
|
|
|
- resource management for functional testing
|
|
|
|
- patterns: page object
|
|
|
|
- parametrized testing
|
|
|
|
- better / more integrated plugin docs
|
2010-07-27 02:54:34 +08:00
|
|
|
i.e. not per-plugin but per-feature referencing a plugin
|
2010-02-07 09:55:50 +08:00
|
|
|
|
|
|
|
generalize parametrized testing to generate combinations
|
|
|
|
-------------------------------------------------------------
|
2010-07-27 03:15:15 +08:00
|
|
|
tags: feature 1.4
|
2010-02-07 09:55:50 +08:00
|
|
|
|
|
|
|
think about extending metafunc.addcall or add a new method to allow to
|
|
|
|
generate tests with combinations of all generated versions - what to do
|
2010-07-27 03:15:15 +08:00
|
|
|
about "id" and "param" in such combinations though?
|
2010-02-07 09:55:50 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
introduce py.test.mark.multi
|
2010-02-07 09:55:50 +08:00
|
|
|
-----------------------------------------
|
|
|
|
tags: feature 1.3
|
|
|
|
|
|
|
|
introduce py.test.mark.multi to specify a number
|
2010-07-27 03:15:15 +08:00
|
|
|
of values for a given function argument.
|
2010-02-07 09:55:50 +08:00
|
|
|
|
2009-12-21 05:11:36 +08:00
|
|
|
have imported module mismatch honour relative paths
|
|
|
|
--------------------------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: bug 1.4
|
2009-12-21 05:11:36 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
With 1.1.1 py.test fails at least on windows if an import
|
|
|
|
is relative and compared against an absolute conftest.py
|
2009-12-21 05:11:36 +08:00
|
|
|
path. Normalize.
|
|
|
|
|
2009-12-07 02:18:53 +08:00
|
|
|
make node._checkcollectable more robust
|
|
|
|
-------------------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: bug 1.4
|
2009-12-07 02:18:53 +08:00
|
|
|
|
|
|
|
currently node._checkcollectable() can raise
|
|
|
|
exceptions for all kinds of reasons ('conftest.py' loading
|
2010-07-27 03:15:15 +08:00
|
|
|
problems, missing rsync-dirs, platform-skip-at-import-level
|
|
|
|
issues, ...). It should just return True/False and cause
|
2009-12-07 02:18:53 +08:00
|
|
|
a good error message.
|
|
|
|
|
|
|
|
call termination with small timeout
|
|
|
|
-------------------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: feature 1.4
|
2009-12-30 18:37:46 +08:00
|
|
|
test: testing/pytest/dist/test_dsession.py - test_terminate_on_hanging_node
|
2009-12-07 02:18:53 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
Call gateway group termination with a small timeout if available.
|
2009-12-07 02:18:53 +08:00
|
|
|
Should make dist-testing less likely to leave lost processes.
|
2009-12-07 20:27:24 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
consider globals: py.test.ensuretemp and config
|
2009-12-30 05:26:03 +08:00
|
|
|
--------------------------------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: experimental-wish 1.4
|
2009-12-30 05:26:03 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
consider deprecating py.test.ensuretemp and py.test.config
|
|
|
|
to further reduce py.test globality. Also consider
|
2010-01-14 01:04:58 +08:00
|
|
|
having py.test.config and ensuretemp coming from
|
|
|
|
a plugin rather than being there from the start.
|
|
|
|
|
2010-07-27 02:54:34 +08:00
|
|
|
consider allowing funcargs for setup methods
|
2010-01-14 01:04:58 +08:00
|
|
|
--------------------------------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: experimental-wish 1.4
|
2010-01-14 01:04:58 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
Users have expressed the wish to have funcargs available to setup
|
2010-01-14 01:04:58 +08:00
|
|
|
functions. Experiment with allowing funcargs there - it might
|
|
|
|
also help to make the py.test.ensuretemp and config deprecation.
|
2010-07-27 03:15:15 +08:00
|
|
|
For filling funcargs for setup methods, we could call funcarg
|
|
|
|
factories with a request object that not have a cls/function
|
2010-05-01 02:03:57 +08:00
|
|
|
attributes. However, how to handle parametrized test functions
|
2010-07-27 03:15:15 +08:00
|
|
|
and funcargs?
|
2010-01-14 01:04:58 +08:00
|
|
|
|
2010-07-27 02:54:34 +08:00
|
|
|
setup_function -> request can be like it is now
|
2010-07-27 03:15:15 +08:00
|
|
|
setup_class -> request has no request.function
|
2010-07-27 02:54:34 +08:00
|
|
|
setup_module -> request has no request.cls
|
|
|
|
|
2010-01-03 21:52:26 +08:00
|
|
|
consider pytest_addsyspath hook
|
|
|
|
-----------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: 1.4
|
2010-01-03 21:52:26 +08:00
|
|
|
|
|
|
|
py.test could call a new pytest_addsyspath() in order to systematically
|
|
|
|
allow manipulation of sys.path and to inhibit it via --no-addsyspath
|
2010-07-27 03:15:15 +08:00
|
|
|
in order to more easily run against installed packages.
|
2010-01-03 21:52:26 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
Alternatively it could also be done via the config object
|
|
|
|
and pytest_configure.
|
2010-01-14 01:17:24 +08:00
|
|
|
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
show plugin information in test header
|
2010-01-14 01:17:24 +08:00
|
|
|
----------------------------------------------------------------
|
2010-05-09 14:43:28 +08:00
|
|
|
tags: feature 1.4
|
2010-01-14 01:17:24 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
Now that external plugins are becoming more numerous
|
2010-01-14 01:17:24 +08:00
|
|
|
it would be useful to have external plugins along with
|
2010-07-27 03:15:15 +08:00
|
|
|
their versions displayed as a header line.
|
2010-01-14 01:17:24 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
deprecate global py.test.config usage
|
2010-05-11 00:54:17 +08:00
|
|
|
----------------------------------------------------------------
|
|
|
|
tags: feature 1.4
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
py.test.ensuretemp and py.test.config are probably the last
|
|
|
|
objects containing global state. Often using them is not
|
|
|
|
neccessary. This is about trying to get rid of them, i.e.
|
|
|
|
deprecating them and checking with PyPy's usages as well
|
|
|
|
as others.
|
2010-05-14 18:02:43 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
remove deprecated bits in collect.py
|
2010-05-14 18:02:43 +08:00
|
|
|
-------------------------------------------------------------------
|
|
|
|
tags: feature 1.4
|
|
|
|
|
|
|
|
In an effort to further simplify code, review and remove deprecated bits
|
|
|
|
in collect.py. Probably good:
|
|
|
|
- inline consider_file/dir methods, no need to have them
|
|
|
|
subclass-overridable because of hooks
|