OLD | NEW |
1 #!/usr/bin/env python | |
2 | |
3 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
4 # | 2 # |
5 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions | 4 # modification, are permitted provided that the following conditions |
7 # are met: | 5 # are met: |
8 # | 6 # |
9 # 1. Redistributions of source code must retain the above | 7 # 1. Redistributions of source code must retain the above |
10 # copyright notice, this list of conditions and the following | 8 # copyright notice, this list of conditions and the following |
11 # disclaimer. | 9 # disclaimer. |
12 # 2. Redistributions in binary form must reproduce the above | 10 # 2. Redistributions in binary form must reproduce the above |
(...skipping 10 matching lines...) Expand all Loading... |
23 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
24 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 22 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
26 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 24 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
27 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 # SUCH DAMAGE. | 26 # SUCH DAMAGE. |
29 | 27 |
30 import optparse | 28 import optparse |
31 import shutil | 29 import shutil |
32 import tempfile | 30 import tempfile |
33 import webkitpy.thirdparty.unittest2 as unittest | 31 import unittest |
34 | 32 |
35 from webkitpy.common.host_mock import MockHost | 33 from webkitpy.common.host_mock import MockHost |
36 from webkitpy.common.system.filesystem_mock import MockFileSystem | 34 from webkitpy.common.system.filesystem_mock import MockFileSystem |
37 from webkitpy.common.system.executive_mock import MockExecutive2, ScriptError | 35 from webkitpy.common.system.executive_mock import MockExecutive2, ScriptError |
38 from webkitpy.common.system.outputcapture import OutputCapture | 36 from webkitpy.common.system.outputcapture import OutputCapture |
39 from webkitpy.w3c.test_importer import TestImporter | 37 from webkitpy.w3c.test_importer import TestImporter |
40 | 38 |
41 | 39 |
42 FAKE_SOURCE_DIR = '/blink/w3c' | 40 FAKE_SOURCE_DIR = '/blink/w3c' |
43 FAKE_REPO_DIR = '/blink' | 41 FAKE_REPO_DIR = '/blink' |
(...skipping 27 matching lines...) Expand all Loading... |
71 | 69 |
72 importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, optparse.V
alues({"overwrite": False, 'destination': 'w3c', 'ignore_expectations': False})) | 70 importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, optparse.V
alues({"overwrite": False, 'destination': 'w3c', 'ignore_expectations': False})) |
73 oc = OutputCapture() | 71 oc = OutputCapture() |
74 oc.capture_output() | 72 oc.capture_output() |
75 try: | 73 try: |
76 importer.do_import() | 74 importer.do_import() |
77 finally: | 75 finally: |
78 oc.restore_output() | 76 oc.restore_output() |
79 | 77 |
80 # FIXME: Needs more tests. | 78 # FIXME: Needs more tests. |
OLD | NEW |