Commit f88052ff authored by nednguyen's avatar nednguyen Committed by Commit bot

[Telemetry] Introduce RunState.SetUpBeforeRunPage and RunState.TearDownAfterRunPage.

This is a step closer to the point of making _RunState --> UserStoryState with
the 4 main methods:

__init__ that does classSetUp
SetUpBeforeRunPage that does setUp before each page run
TearDownAfterRunPage that does tearDown after each page run
TearDownAfterRunPageSet that does final classTearDown

BUG=418278

Review URL: https://codereview.chromium.org/692973003

Cr-Commit-Position: refs/heads/master@{#302695}
parent 844c1557
......@@ -687,9 +687,9 @@ class RunStateTest(unittest.TestCase):
# pylint: disable=W0212
def TestUseLiveSitesFlag(self, options, expected_wpr_mode):
with tempfile.NamedTemporaryFile() as f:
run_state = page_runner._RunState(DummyTest())
run_state = page_runner._RunState(DummyTest(), options)
fake_network_controller = FakeNetworkController()
run_state._PrepareWpr(options, fake_network_controller, f.name, None)
run_state._PrepareWpr(fake_network_controller, f.name, None)
self.assertEquals(fake_network_controller.wpr_mode, expected_wpr_mode)
self.assertEquals(fake_network_controller.archive_path, f.name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment