File tree Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ def teardown_request2(exc):
529
529
pass
530
530
@app .route ('/' )
531
531
def fails ():
532
- 1 / 0
532
+ 1 // 0
533
533
rv = app .test_client ().get ('/' )
534
534
self .assert_equal (rv .status_code , 500 )
535
535
self .assert_in (b'Internal Server Error' , rv .data )
@@ -866,7 +866,7 @@ def apprunner(configkey):
866
866
app = flask .Flask (__name__ )
867
867
@app .route ('/' )
868
868
def index ():
869
- 1 / 0
869
+ 1 // 0
870
870
c = app .test_client ()
871
871
if config_key is not None :
872
872
app .config [config_key ] = True
@@ -1054,7 +1054,7 @@ def test_preserve_only_once(self):
1054
1054
1055
1055
@app .route ('/fail' )
1056
1056
def fail_func ():
1057
- 1 / 0
1057
+ 1 // 0
1058
1058
1059
1059
c = app .test_client ()
1060
1060
for x in range (3 ):
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ def index():
306
306
307
307
@app .route ('/exc' )
308
308
def exc ():
309
- 1 / 0
309
+ 1 // 0
310
310
311
311
with app .test_client () as c :
312
312
with catch_stderr () as err :
@@ -340,7 +340,7 @@ def test_exception_logging(self):
340
340
341
341
@app .route ('/' )
342
342
def index ():
343
- 1 / 0
343
+ 1 // 0
344
344
345
345
rv = app .test_client ().get ('/' )
346
346
self .assert_equal (rv .status_code , 500 )
@@ -349,19 +349,19 @@ def index():
349
349
err = out .getvalue ()
350
350
self .assert_in ('Exception on / [GET]' , err )
351
351
self .assert_in ('Traceback (most recent call last):' , err )
352
- self .assert_in ('1/ 0' , err )
352
+ self .assert_in ('1 // 0' , err )
353
353
self .assert_in ('ZeroDivisionError:' , err )
354
354
355
355
def test_processor_exceptions (self ):
356
356
app = flask .Flask (__name__ )
357
357
@app .before_request
358
358
def before_request ():
359
359
if trigger == 'before' :
360
- 1 / 0
360
+ 1 // 0
361
361
@app .after_request
362
362
def after_request (response ):
363
363
if trigger == 'after' :
364
- 1 / 0
364
+ 1 // 0
365
365
return response
366
366
@app .route ('/' )
367
367
def index ():
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def test_request_exception_signal(self):
83
83
84
84
@app .route ('/' )
85
85
def index ():
86
- 1 / 0
86
+ 1 // 0
87
87
88
88
def record (sender , exception ):
89
89
recorded .append (exception )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def log_exception(self, exc_info):
30
30
31
31
@app .route ('/' )
32
32
def index ():
33
- 1 / 0
33
+ 1 // 0
34
34
35
35
rv = app .test_client ().get ('/' )
36
36
self .assert_equal (rv .status_code , 500 )
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ def index():
143
143
144
144
@app .route ('/other' )
145
145
def other ():
146
- 1 / 0
146
+ 1 // 0
147
147
148
148
with app .test_client () as c :
149
149
resp = c .get ('/' )
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ def test_view_patching(self):
55
55
56
56
class Index (flask .views .MethodView ):
57
57
def get (self ):
58
- 1 / 0
58
+ 1 // 0
59
59
def post (self ):
60
- 1 / 0
60
+ 1 // 0
61
61
62
62
class Other (Index ):
63
63
def get (self ):
You can’t perform that action at this time.
0 commit comments