Commit Graph

28 Commits

Author SHA1 Message Date
Bruno Oliveira 6c8b0a28e1 Add deprecation module to centralize deprecation messages and bits of code 2016-07-25 18:14:39 -03:00
Ronny Pfannschmidt 04deea3c6d fix flaky get_user fallback tests 2015-09-29 21:00:12 +02: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 558e5406e8 test_get_user should execute on windows only 2015-09-16 13:06:39 -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
Bruno Oliveira 74bc50e97c Fix flakes 2015-07-15 20:45:35 -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
holger krekel 2b8a54d5d9 refine skipif to use direct booleans, to help with flakes 2014-01-29 11:46:36 +01:00
holger krekel 505a34bb85 fix flakes failures 2014-01-29 10:20:13 +01:00
Jurko Gospodnetić 9fb2079458 replace py.test module references with pytest
The only remaining 'py.test' references are:
 * those referring to the 'py.test' executable
 * those in code explicitly testing py.test/pytest module compatibility
 * those in old CHANGES documentation
 * those in documentation generated based on external data
 * those in seemingly unfinished & unmaintained Japanese documentation

Minor stylistic changes and typo corrections made to documentation next to
several applied py.test --> pytest content changes.
2014-01-18 12:31:33 +01:00
holger krekel 8ac5af2896 fix flakes issues and make --flakes run part of tox runs 2013-10-12 15:39:22 +02: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 fad7bd4393 simplify Config constructor 2013-09-28 22:22:53 +02:00
holger krekel b2cb93e06d allow re-running of a test item (as exercised by the
pytest-rerunfailures plugins) by re-initializing and removing
request/funcargs information in runtestprotocol() - which is a slightly
odd place to add funcarg-related functionality but it allows all
pytest_runtest_setup/teardown hooks to properly see a valid
request/funcarg content on test items.
2013-04-22 10:35:48 +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 e14459d45c discover funcarg factories independently from request/Function items 2012-07-20 14:16:28 +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 974e4e3a9d skip the symlink test on windows, win32/py32 does not support it without privs 2011-11-07 22:00:12 +00:00
holger krekel 369b7709f7 use os.symlink to make things work on windows/py32 2011-11-07 21:02:07 +00:00
holger krekel a2f4a11301 refine lsof/FD leakage testing and rework test setup and some of pytest own tests. Note that the actual diff to non-test code is small. Also remove some redundant tests (introduced by a copy-paste-error apparently in test_mark.py). 2011-11-07 18:08:41 +00: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 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 a698465487 streamline docs, especially use "import pytest" and "pytest.*" in python code examples instead of "import py" and "py.test.*". 2010-11-17 22:12:16 +01:00
holger krekel 076e03e90f also un-nest test directory 2010-11-13 11:30:40 +01:00