Bug 1319237 - Make session fixture module scoped; r=jgraham
I recently changed it to function scoped, which was a mistake.
pytest complains if it is not module scoped.
MozReview-Commit-ID: GYP9Ky1avks
--- a/testing/web-platform/harness/wptrunner/executors/pytestrunner/fixtures.py
+++ b/testing/web-platform/harness/wptrunner/executors/pytestrunner/fixtures.py
@@ -53,17 +53,17 @@ class Session(object):
When the test function goes out of scope, any remaining user prompts
and opened windows are closed, and the current browsing context is
switched back to the top-level browsing context.
"""
def __init__(self, client):
self.client = client
- @pytest.fixture(scope="function")
+ @pytest.fixture(scope="module")
def session(self, request):
# finalisers are popped off a stack,
# making their ordering reverse
request.addfinalizer(self.switch_to_top_level_browsing_context)
request.addfinalizer(self.restore_windows)
request.addfinalizer(self.dismiss_user_prompts)
return self.client