Silencing a few 2.7 tests.
This commit is contained in:
		@@ -6,10 +6,13 @@ from eventlet.green import time
 | 
				
			|||||||
from eventlet import hubs
 | 
					from eventlet import hubs
 | 
				
			||||||
hubs.get_hub()
 | 
					hubs.get_hub()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
patcher.inject('test.test_thread',
 | 
					patcher.inject('test.test_thread', globals())
 | 
				
			||||||
    globals(),
 | 
					
 | 
				
			||||||
    ('time', time),
 | 
					try:
 | 
				
			||||||
    ('thread', thread))
 | 
					    # this is a new test in 2.7 that we don't support yet
 | 
				
			||||||
 | 
					    TestForkInThread.test_forkinthread = lambda *a, **kw: None
 | 
				
			||||||
 | 
					except NameError:
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,10 +7,7 @@ from eventlet.green import time
 | 
				
			|||||||
# the tests are launched via subprocess and therefore don't get patched
 | 
					# the tests are launched via subprocess and therefore don't get patched
 | 
				
			||||||
 | 
					
 | 
				
			||||||
patcher.inject('test.test_threading',
 | 
					patcher.inject('test.test_threading',
 | 
				
			||||||
    globals(),
 | 
					               globals())
 | 
				
			||||||
    ('threading', threading),
 | 
					 | 
				
			||||||
    ('thread', thread),
 | 
					 | 
				
			||||||
    ('time', time))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# "PyThreadState_SetAsyncExc() is a CPython-only gimmick, not (currently)
 | 
					# "PyThreadState_SetAsyncExc() is a CPython-only gimmick, not (currently)
 | 
				
			||||||
# exposed at the Python level.  This test relies on ctypes to get at it."
 | 
					# exposed at the Python level.  This test relies on ctypes to get at it."
 | 
				
			||||||
@@ -27,6 +24,23 @@ try:
 | 
				
			|||||||
except (AttributeError, NameError):
 | 
					except (AttributeError, NameError):
 | 
				
			||||||
    pass
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# disabling this test because it relies on dorking with the hidden
 | 
				
			||||||
 | 
					# innards of the threading module in a way that doesn't appear to work
 | 
				
			||||||
 | 
					# when patched
 | 
				
			||||||
 | 
					try:
 | 
				
			||||||
 | 
					    ThreadTests.test_limbo_cleanup = lambda *a, **kw: None
 | 
				
			||||||
 | 
					except (AttributeError, NameError):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# this test has nothing to do with Eventlet; if it fails it's not
 | 
				
			||||||
 | 
					# because of patching (which it does, grump grump)
 | 
				
			||||||
 | 
					try:
 | 
				
			||||||
 | 
					    ThreadTests.test_finalize_runnning_thread = lambda *a, **kw: None
 | 
				
			||||||
 | 
					    # it's misspelled in the stdlib, silencing this version as well because
 | 
				
			||||||
 | 
					    # inevitably someone will correct the error
 | 
				
			||||||
 | 
					    ThreadTests.test_finalize_running_thread = lambda *a, **kw: None
 | 
				
			||||||
 | 
					except (AttributeError, NameError):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
    test_main()
 | 
					    test_main()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user