Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / build / android / pylib / base / test_instance.py
blobcdf678f2d287b1efcad2f05e91ab9f8a1057c727
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 class TestInstance(object):
7 """A type of test.
9 This is expected to handle all logic that is test-type specific but
10 independent of the environment or device.
12 Examples include:
13 - gtests
14 - instrumentation tests
15 """
17 def __init__(self):
18 pass
20 def TestType(self):
21 raise NotImplementedError
23 def SetUp(self):
24 raise NotImplementedError
26 def TearDown(self):
27 raise NotImplementedError
29 def __enter__(self):
30 self.SetUp()
31 return self
33 def __exit__(self, _exc_type, _exc_val, _exc_tb):
34 self.TearDown()