Commit Graph

27 Commits

Author SHA1 Message Date
Bruno Oliveira 42a5d6bdfa Add __future__ imports to all pytest modules
This prevents silly errors from creeping in Python 2 when testing in Python 3
2017-03-16 22:45:40 -03:00
Bruno Oliveira 1e0cf5ce4d Merge remote-tracking branch 'upstream/master' into merge-master-into-features
# Conflicts:
#	AUTHORS
#	CHANGELOG.rst
#	_pytest/pytester.py
2017-03-10 15:54:05 -03:00
Ville Skyttä eeb6603d71 Python 3.6 invalid escape sequence deprecation fixes 2017-02-15 16:54:53 +02:00
mandeep d4afa1554b Refactored old style classes to new style classes 2017-01-08 22:52:42 -06:00
Bruno Oliveira 1eb5a690d4 Fix flake8 E305 and E306 errors
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
2016-11-20 18:59:15 -02:00
Bruno Oliveira c2864aba3d Merge branch 'master' into merge-master
# Conflicts:
#	AUTHORS
#	CHANGELOG.rst
#	_pytest/monkeypatch.py
#	_pytest/python.py
2016-07-25 19:06:29 -03:00
Javi Romero 7e37497d5a Uppercase first word in docstrings. Change to an imperative form. Add name to authors. 2016-07-22 12:39:06 +02:00
Bruno Oliveira 458ecae1df Replace all usages of "pytest_funcarg__" for @pytest.fixture 2016-07-11 22:21:52 -03:00
Andy Freeland b1c9b8b415 Make tmpdir resiliant to user ids that do not exist
Previously, the tmpdir fixture would fail if the current process's user
id does not correspond to a valid user (e.g. running pytest in a Docker
container with 'docker run -u').
2015-09-18 21:26:19 -04:00
Bruno Oliveira 130e6cf8a2 Use temproot as a fallback if the current user couldn't be obtained 2015-09-16 16:42:07 -03:00
Bruno Oliveira 1150e87e31 Extract get_user logic into a separate function 2015-09-16 12:47:50 -03:00
Bruno Oliveira 6676aeda5a Make tmpdir more resilient in case environment variables required by getpass are missing
Fix #1010
2015-09-16 12:20:07 -03:00
Bruno Oliveira 4302972c23 Use pytest-of-$user as base directory for tmpdir_factory
Before tmpdir_factory, pytest used to create a link named "pytest-$user" to the current numbered directory. Use
 a different name so there's no conflict when running different pytest versions.

Fix #894
2015-07-28 20:57:48 -03:00
Anatoly Bubenkov 6af7172204 Merge branch 'pytest-2.7' 2015-07-19 15:25:04 +02:00
Bruno Oliveira 330de0a93d Use a subdirectory in the TEMP directory to speed up tmpdir creation
Fix #105
2015-07-16 19:50:49 -03:00
Bruno Oliveira 0f52856f99 Use a subdirectory in the TEMP directory to speed up tmpdir creation
Fix #105
2015-07-15 20:03:58 -03:00
Bruno Oliveira 5603a0cd4b Removing py.std usage from _pytest 2014-07-31 19:13:40 -03:00
holger krekel 9fdfa155fb fix issue354: avoid tmpdir fixture to create too long filenames especially
when parametrization is used
2013-10-03 14:22:54 +02:00
holger krekel f3e03fc298 modernize tmpdir fixture (use request.node in tmpdir fixture, use @pytest.fixture) 2012-11-19 14:07:14 +01:00
holger krekel 6eec2f5893 make tmpdir fixture always return a realpath()ed tmpdir and make a note
about it in the changed test.  Currently, i don't see a reason why this
is a bad idea (tm)
2012-10-11 13:05:16 +02:00
holger krekel c7ee6e71ab re-introduce the old 2.2.4 FuncargRequest implementation as it is a better
base for implementing the new funcarg/setup api. Also Un-optimize
funcargnames discovery for now.
2012-07-18 19:49:14 +02:00
holger krekel 91b6f2bda8 mid-scale refactoring to make request API available directly on items.
This commit was slightly tricky because i want to backward
compatibility especially for the oejskit plugin which
uses Funcarg-filling for non-Function objects.
2012-06-25 17:35:33 +02:00
holger krekel 077c468589 don't remove symlinks from temporary directory path - should help with some standard OSX setups 2011-11-06 19:34:02 +00:00
holger krekel 942ae47cd1 tentatively use internal list for cleanups at unconfigure time - this helps reporting with partially executed pytest_configure() hooks 2011-04-17 12:20:13 +02:00
holger krekel fadd1a2313 incorporate typo/grammar fixes from Laura and respond to a number of issues she raised in comments.
Also fixed links and some other bits and pieces.
2011-03-03 23:40:38 +01:00
holger krekel f456e376b9 refine tmpdir handling and docs
- clear tmpdir specified with --basetemp
- remove config.mktmp and config.getbasetemp methods
2010-11-21 17:43:18 +01:00
holger krekel 929291775e flat is better than nested (cont'd):
- pytest.py is new module, making "python -m pytest" work always
- _pytest/*.py now contains core.py, hookspec and the plugins, no sub packages
2010-11-13 11:10:45 +01:00