[pypy-commit] pypy resource_warning: skip resource warning tests under appdirect

cfbolz pypy.commits at gmail.com
Sun Aug 7 06:05:23 EDT 2016


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: resource_warning
Changeset: r86060:d74e414261fc
Date: 2016-08-07 11:35 +0200
http://bitbucket.org/pypy/pypy/changeset/d74e414261fc/

Log:	skip resource warning tests under appdirect

diff --git a/pypy/module/_file/test/test_file.py b/pypy/module/_file/test/test_file.py
--- a/pypy/module/_file/test/test_file.py
+++ b/pypy/module/_file/test/test_file.py
@@ -218,6 +218,9 @@
         assert exc.value.filename == os.curdir
 
     def test_encoding_errors(self):
+        import sys
+        if '__pypy__' not in sys.builtin_module_names:
+            pytest.skip("pypy only test")
         import _file
 
         with self.file(self.temppath, "w") as f:
@@ -266,6 +269,7 @@
         if '__pypy__' in sys.builtin_module_names:
             assert repr(self.temppath) in g.getvalue()
 
+    @pytest.mark.skipif("config.option.runappdirect")
     def test_track_resources(self):
         import os, gc, sys, cStringIO
         if '__pypy__' not in sys.builtin_module_names:
@@ -308,6 +312,7 @@
         assert self.regex_search("WARNING: unclosed file: <open file .*>", msg)
         assert "Created at" not in msg
 
+    @pytest.mark.skipif("config.option.runappdirect")
     def test_track_resources_dont_crash(self):
         import os, gc, sys, cStringIO
         if '__pypy__' not in sys.builtin_module_names:
diff --git a/pypy/module/_socket/test/test_sock_app.py b/pypy/module/_socket/test/test_sock_app.py
--- a/pypy/module/_socket/test/test_sock_app.py
+++ b/pypy/module/_socket/test/test_sock_app.py
@@ -414,6 +414,7 @@
         if os.name != 'nt':
             raises(OSError, os.close, fileno)
 
+    @pytest.mark.skipif("config.option.runappdirect")
     def test_track_resources(self):
         import os, gc, sys, cStringIO
         import _socket


More information about the pypy-commit mailing list