XXX REVIEW and remove the below XXX
You may put conftest.py files containing project-specific configuration in your project's root directory, it's usually best to put it just into the same directory level as your topmost __init__.py. In fact, py.test performs an "upwards" search starting from the directory that you specify to be tested and will lookup configuration values right-to-left. You may have options that reside e.g. in your home directory but note that project specific settings will be considered first. There is a flag that helps you debugging your conftest.py configurations:
py.test --traceconfig
To introduce different test items you can create one or more conftest.py files in your project. When the collection process traverses directories and modules the default collectors will produce custom Collectors and Items if they are found in a local conftest.py file.
If you have a module where you want to take responsibility for collecting your own test Items and possibly even for executing a test then you can provide generative tests that yield callables and possibly arguments as a tuple. This is especially useful for calling application test machinery with different parameter sets but counting each of the calls as a separate tests.
The other extension possibility is about specifying a custom test Item class which is responsible for setting up and executing an underlying test. Or you can extend the collection process for a whole directory tree by putting Items in a conftest.py configuration file. The collection process dynamically consults the chain of conftest.py modules to determine collectors and items at Directory, Module, Class, Function or Generator level respectively.