Mercurial > hg > CommitWatcher
annotate tests/unit.py @ 13:fc91a93fcaee
tests/unit.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 28 Sep 2013 07:08:32 -0700 |
parents | a0ff003319ec |
children | 8a02f209992f |
rev | line source |
---|---|
0 | 1 #!/usr/bin/env python |
2 | |
3 """ | |
4 unit tests | |
5 """ | |
6 | |
7 import os | |
8 import sys | |
9 import unittest | |
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 | 13 # globals |
14 here = os.path.dirname(os.path.abspath(__file__)) | |
15 | |
11
546695da018c
commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
16 class CommitWatcherUnitTest(unittest.TestCase): |
0 | 17 |
13 | 18 # diff -> files mapping, from `lsdiff` |
19 diff_files = [('41701d2c0341.diff': ['mobile/android/components/HelperAppDialog.js']), | |
20 ('4e1a3919e741.diff', ["gfx/gl/GLContext.cpp", | |
21 "gfx/gl/GLContext.h", | |
22 "gfx/layers/Compositor.h", | |
23 "gfx/layers/Layers.cpp", | |
24 "gfx/layers/Layers.h", | |
25 "gfx/layers/basic/BasicCompositor.cpp", | |
26 "gfx/layers/basic/BasicCompositor.h", | |
27 "gfx/layers/composite/LayerManagerComposite.cpp", | |
28 "gfx/layers/composite/LayerManagerComposite.h", | |
29 "gfx/layers/d3d11/CompositorD3D11.cpp", | |
30 "gfx/layers/d3d11/CompositorD3D11.h", | |
31 "gfx/layers/d3d9/CompositorD3D9.cpp", | |
32 "gfx/layers/d3d9/CompositorD3D9.h", | |
33 "gfx/layers/ipc/CompositorParent.cpp", | |
34 "gfx/layers/ipc/CompositorParent.h", | |
35 "gfx/layers/ipc/LayerTransactionParent.cpp", | |
36 "gfx/layers/opengl/CompositorOGL.cpp", | |
37 "gfx/layers/opengl/CompositorOGL.h", | |
38 "gfx/thebes/gfx2DGlue.h", | |
39 ] | |
11
546695da018c
commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
40 def test_patch(self): |
546695da018c
commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
41 """test parsing the files from a patch""" |
546695da018c
commitwatcher/agent.py tests/unit.py
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
42 |
12 | 43 diff = os.path.join(here, '41701d2c0341.diff') |
44 files = FeedAgentDiff.lsdiff(diff) | |
0 | 45 |
46 if __name__ == '__main__': | |
47 unittest.main() | |
48 |