Floris Bruynooghe avatar Floris Bruynooghe committed ad599c5

Add isolation plugin as a feature

Comments (0)

Files changed (1)

 This could be run with at least three different ways to invoke pytest:
 through the shell, through "python -m pytest" and inlined. As inlined
 would be the fastest it could be run first (or "--fast" mode).
+
+
+Create isolate plugin
+---------------------
+tags: feature
+
+The idea is that you can e.g. import modules in a test and afterwards
+sys.modules, sys.meta_path etc would be reverted.  It can go further
+then just importing however, e.g. current working direcroty, file
+descriptors, ...
+
+This would probably be done by marking::
+
+    @pytest.mark.isolate(importing=True, cwd=True, fds=False)
+    def test_foo():
+        ...
+
+With the possibility of doing this globally in an ini-file.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.