Change the skips to actual pytest skips

By using the builtin pytest skips we can identify that the tests are still there but are being currently skipped.

Will update later to remove the skips once we figure out why they freeze with pytest (I experienced this same issue with multiprocessing when testing start/stop events).
This commit is contained in:
Eli Uriegas 2017-01-08 11:55:08 -06:00 committed by GitHub
parent f8e6becb9e
commit 5566668a5f

View File

@ -2,6 +2,8 @@ from multiprocessing import Array, Event, Process
from time import sleep, time from time import sleep, time
from ujson import loads as json_loads from ujson import loads as json_loads
import pytest
from sanic import Sanic from sanic import Sanic
from sanic.response import json from sanic.response import json
from sanic.utils import local_request, HOST, PORT from sanic.utils import local_request, HOST, PORT
@ -13,8 +15,9 @@ from sanic.utils import local_request, HOST, PORT
# TODO: Figure out why this freezes on pytest but not when # TODO: Figure out why this freezes on pytest but not when
# executed via interpreter # executed via interpreter
@pytest.mark.skip(
def skip_test_multiprocessing(): reason="Freezes with pytest not on interpreter")
def test_multiprocessing():
app = Sanic('test_json') app = Sanic('test_json')
response = Array('c', 50) response = Array('c', 50)
@ -52,8 +55,9 @@ def skip_test_multiprocessing():
assert results.get('test') == True assert results.get('test') == True
@pytest.mark.skip(
def skip_test_drain_connections(): reason="Freezes with pytest not on interpreter")
def test_drain_connections():
app = Sanic('test_json') app = Sanic('test_json')
@app.route('/') @app.route('/')