annotate tests/unit.py @ 38:035368f84847

indent
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 04 Nov 2013 23:20:32 -0800
parents 77118f83b5b7
children 32cf3d3469c3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/usr/bin/env python
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 """
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 unit tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 """
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 import os
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 import sys
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9 import unittest
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10
11
546695da018c commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
11 from commitwatcher import FeedAgentDiff
546695da018c commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
12
0
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 # globals
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14 here = os.path.dirname(os.path.abspath(__file__))
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
15
11
546695da018c commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
16 class CommitWatcherUnitTest(unittest.TestCase):
0
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
17
13
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
18 # diff -> files mapping, from `lsdiff`
14
8a02f209992f tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 13
diff changeset
19 diff_files = [('41701d2c0341.diff', ['mobile/android/components/HelperAppDialog.js']),
13
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
20 ('4e1a3919e741.diff', ["gfx/gl/GLContext.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
21 "gfx/gl/GLContext.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
22 "gfx/layers/Compositor.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
23 "gfx/layers/Layers.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
24 "gfx/layers/Layers.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
25 "gfx/layers/basic/BasicCompositor.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
26 "gfx/layers/basic/BasicCompositor.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
27 "gfx/layers/composite/LayerManagerComposite.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
28 "gfx/layers/composite/LayerManagerComposite.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
29 "gfx/layers/d3d11/CompositorD3D11.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
30 "gfx/layers/d3d11/CompositorD3D11.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
31 "gfx/layers/d3d9/CompositorD3D9.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
32 "gfx/layers/d3d9/CompositorD3D9.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
33 "gfx/layers/ipc/CompositorParent.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
34 "gfx/layers/ipc/CompositorParent.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
35 "gfx/layers/ipc/LayerTransactionParent.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
36 "gfx/layers/opengl/CompositorOGL.cpp",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
37 "gfx/layers/opengl/CompositorOGL.h",
fc91a93fcaee tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
38 "gfx/thebes/gfx2DGlue.h",
14
8a02f209992f tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 13
diff changeset
39 ])
8a02f209992f tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 13
diff changeset
40 ]
11
546695da018c commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
41 def test_patch(self):
546695da018c commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
42 """test parsing the files from a patch"""
546695da018c commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
43
15
77118f83b5b7 almost does somethign
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
44 for diff, filenames in self.diff_files:
77118f83b5b7 almost does somethign
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
45 diff = os.path.join(here, diff)
77118f83b5b7 almost does somethign
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
46 files = FeedAgentDiff.lsdiff(diff)
0
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
47
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
48 if __name__ == '__main__':
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
49 unittest.main()
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
50