| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. 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 are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 def test_operating_system(self): | 322 def test_operating_system(self): |
| 323 self.assertEqual('mac', self.make_port().operating_system()) | 323 self.assertEqual('mac', self.make_port().operating_system()) |
| 324 | 324 |
| 325 def test_http_server_supports_ipv6(self): | 325 def test_http_server_supports_ipv6(self): |
| 326 port = self.make_port() | 326 port = self.make_port() |
| 327 self.assertTrue(port.http_server_supports_ipv6()) | 327 self.assertTrue(port.http_server_supports_ipv6()) |
| 328 port.host.platform.os_name = 'cygwin' | 328 port.host.platform.os_name = 'cygwin' |
| 329 self.assertFalse(port.http_server_supports_ipv6()) | 329 self.assertFalse(port.http_server_supports_ipv6()) |
| 330 port.host.platform.os_name = 'win' | 330 port.host.platform.os_name = 'win' |
| 331 self.assertTrue(port.http_server_supports_ipv6()) | 331 self.assertFalse(port.http_server_supports_ipv6()) |
| 332 | 332 |
| 333 def test_check_httpd_success(self): | 333 def test_check_httpd_success(self): |
| 334 port = self.make_port(executive=MockExecutive2()) | 334 port = self.make_port(executive=MockExecutive2()) |
| 335 port.path_to_apache = lambda: '/usr/sbin/httpd' | 335 port.path_to_apache = lambda: '/usr/sbin/httpd' |
| 336 capture = OutputCapture() | 336 capture = OutputCapture() |
| 337 capture.capture_output() | 337 capture.capture_output() |
| 338 self.assertTrue(port.check_httpd()) | 338 self.assertTrue(port.check_httpd()) |
| 339 _, _, logs = capture.restore_output() | 339 _, _, logs = capture.restore_output() |
| 340 self.assertEqual('', logs) | 340 self.assertEqual('', logs) |
| 341 | 341 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args']) | 461 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args']) |
| 462 self.assertFalse(hasattr(suite, 'name')) | 462 self.assertFalse(hasattr(suite, 'name')) |
| 463 self.assertFalse(hasattr(suite, 'base')) | 463 self.assertFalse(hasattr(suite, 'base')) |
| 464 self.assertFalse(hasattr(suite, 'args')) | 464 self.assertFalse(hasattr(suite, 'args')) |
| 465 | 465 |
| 466 def test_legacy(self): | 466 def test_legacy(self): |
| 467 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args'], use_legacy
_naming=True) | 467 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args'], use_legacy
_naming=True) |
| 468 self.assertEqual(suite.name, 'virtual/suite/bar') | 468 self.assertEqual(suite.name, 'virtual/suite/bar') |
| 469 self.assertEqual(suite.base, 'base/foo') | 469 self.assertEqual(suite.base, 'base/foo') |
| 470 self.assertEqual(suite.args, ['--args']) | 470 self.assertEqual(suite.args, ['--args']) |
| OLD | NEW |