Mercurial > hg > CommitWatcher
annotate tests/unit.py @ 23:e65090645a18
commitwatcher/store.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 02 Oct 2013 12:37:09 -0700 |
parents | 77118f83b5b7 |
children | 32cf3d3469c3 |
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` |
14 | 19 diff_files = [('41701d2c0341.diff', ['mobile/android/components/HelperAppDialog.js']), |
13 | 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", | |
14 | 39 ]) |
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 | 44 for diff, filenames in self.diff_files: |
45 diff = os.path.join(here, diff) | |
46 files = FeedAgentDiff.lsdiff(diff) | |
0 | 47 |
48 if __name__ == '__main__': | |
49 unittest.main() | |
50 |