コード例 #1
0
 def test_doing_nothing(self):
   """Test doing nothing."""
   self.assertEqual('/testpath/testcase',
                    reproducers.update_testcase_path_in_layout_test(
                        '/testpath/testcase', '/original/testcase', '/source',
                        100))
   self.assertEqual('/testcase_dir/testcase',
                    reproducers.update_testcase_path_in_layout_test(
                        '/testcase_dir/testcase',
                        '/original/LayoutTests/original_dir/original_file',
                        '/source/',
                        reproducers.LAYOUT_HACK_CUTOFF_DATE_IN_SECONDS + 100))
コード例 #2
0
 def test_update(self):
   """Update the testcase path."""
   new_path = (
       '/source/third_party/WebKit/LayoutTests/original_dir/original_file')
   self.assertEqual(new_path,
                    reproducers.update_testcase_path_in_layout_test(
                        '/testcase_dir/testcase',
                        '/original/LayoutTests/original_dir/original_file',
                        '/source/', 100))
   with open(new_path) as f:
     self.assertEqual('Some test', f.read())
コード例 #3
0
 def test_doing_nothing(self):
     """Test doing nothing."""
     self.assertEqual(
         '/testpath/testcase',
         reproducers.update_testcase_path_in_layout_test(
             '/testpath/testcase', '/original/testcase', '/source'))