Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py

Issue 1839193004: Run auto-formatter (autopep8) on webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 'Retrying in 0 seconds...\n', 74 'Retrying in 0 seconds...\n',
75 'WARNING: Received HTTP status 500 loading "http://examp le.com/". ' 75 'WARNING: Received HTTP status 500 loading "http://examp le.com/". '
76 'Retrying in 0.0 seconds...\n']) 76 'Retrying in 0.0 seconds...\n'])
77 77
78 def test_convert_404_to_None(self): 78 def test_convert_404_to_None(self):
79 transaction = NetworkTransaction(convert_404_to_None=True) 79 transaction = NetworkTransaction(convert_404_to_None=True)
80 self.assertEqual(transaction.run(lambda: self._raise_404_error()), None) 80 self.assertEqual(transaction.run(lambda: self._raise_404_error()), None)
81 81
82 def test_timeout(self): 82 def test_timeout(self):
83 self._run_count = 0 83 self._run_count = 0
84 transaction = NetworkTransaction(initial_backoff_seconds=60*60, timeout_ seconds=60) 84 transaction = NetworkTransaction(initial_backoff_seconds=60 * 60, timeou t_seconds=60)
85 did_process_exception = False 85 did_process_exception = False
86 did_throw_exception = True 86 did_throw_exception = True
87 try: 87 try:
88 transaction.run(lambda: self._raise_500_error()) 88 transaction.run(lambda: self._raise_500_error())
89 did_throw_exception = False 89 did_throw_exception = False
90 except NetworkTimeout, e: 90 except NetworkTimeout, e:
91 did_process_exception = True 91 did_process_exception = True
92 self.assertTrue(did_throw_exception) 92 self.assertTrue(did_throw_exception)
93 self.assertTrue(did_process_exception) 93 self.assertTrue(did_process_exception)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698