aboutsummaryrefslogtreecommitdiff
path: root/bestflags/executor_test.py
blob: 0f27fb9a557881ba615c0639cb8e5eabafdbefbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""Tester unittest."""

__author__ = 'yuhenglong@google.com (Yuheng Long)'

import unittest

import executor


class TesterTest(unittest.TestCase):
  """This class test the Executor.

  Given the same flags set and/or checksum, the image and the cost should be the
  same from the Executor.
  """

  def setUp(self):
    """Create the Executor to be tested."""

    self.tester = executor.Tester(1, None)

  def testExecute(self):
    """"Test the execute method.

    Call the execute method twice, and test the results. The results should be
    the same, i.e., the cost should be the same.
    Either the execute method or the set_execution_result of the input
    Generation for the Tester should be called, but not both.
    """
    self.tester.execute(self)

  def testInit(self):
    """"Test the init method.

    If a certain checksum has been encountered before, the Tester should not
    reexecute the images with the same checksum.
    """

    pass

if __name__ == '__main__':
  unittest.main()