| OLD | NEW |
| 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions | 4 # modification, are permitted provided that the following conditions |
| 5 # are met: | 5 # are met: |
| 6 # | 6 # |
| 7 # 1. Redistributions of source code must retain the above | 7 # 1. Redistributions of source code must retain the above |
| 8 # copyright notice, this list of conditions and the following | 8 # copyright notice, this list of conditions and the following |
| 9 # disclaimer. | 9 # disclaimer. |
| 10 # 2. Redistributions in binary form must reproduce the above | 10 # 2. Redistributions in binary form must reproduce the above |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 # FIXME: use a mock filesystem | 216 # FIXME: use a mock filesystem |
| 217 parser = TestParser(os.path.join(os.path.dirname(__file__), 'test_parser
.py'), MockHost()) | 217 parser = TestParser(os.path.join(os.path.dirname(__file__), 'test_parser
.py'), MockHost()) |
| 218 test_info = parser.analyze_test() | 218 test_info = parser.analyze_test() |
| 219 self.assertEqual(test_info, None, 'no tests should have been found in th
is file') | 219 self.assertEqual(test_info, None, 'no tests should have been found in th
is file') |
| 220 | 220 |
| 221 def test_parser_initialization_non_existent_file(self): | 221 def test_parser_initialization_non_existent_file(self): |
| 222 parser = TestParser('some/bogus/path.html', MockHost()) | 222 parser = TestParser('some/bogus/path.html', MockHost()) |
| 223 self.assertEqual(parser.filename, 'some/bogus/path.html') | 223 self.assertEqual(parser.filename, 'some/bogus/path.html') |
| 224 self.assertIsNone(parser.test_doc) | 224 self.assertIsNone(parser.test_doc) |
| 225 self.assertIsNone(parser.ref_doc) | 225 self.assertIsNone(parser.ref_doc) |
| 226 |
| 227 def test_load_file_with_non_ascii_tags(self): |
| 228 host = MockHost() |
| 229 host.filesystem.files['/some/path.xml'] = '<d\xc3\x98dd></d\xc3\x98dd>' |
| 230 parser = TestParser('/some/path.xml', host) |
| 231 self.assertEqual(parser.filename, '/some/path.xml') |
| 232 self.assertIsNone(parser.test_doc) |
| OLD | NEW |