@@ -1224,29 +1224,34 @@ def test_ceil():
1224
1224
math .ceil (with_ceil ) # edit to effect call
1225
1225
1226
1226
1227
- # # 3.3.9. With Statement Context Managers
1228
- # # object.__enter__(self)
1229
- # class With_enter:
1227
+ # 3.3.9. With Statement Context Managers
1228
+ # object.__enter__(self)
1229
+ class With_enter :
1230
1230
1231
- # def __enter__(self):
1232
- # OK()
1233
- # return "" # edit to match type
1231
+ def __enter__ (self ):
1232
+ OK ()
1233
+ return
1234
1234
1235
- # def test_enter():
1236
- # with_enter = With_enter()
1237
- # enter(with_enter) # edit to effect call
1235
+ def __exit__ (self , exc_type , exc_value , traceback ):
1236
+ return
1238
1237
1239
- # # object.__exit__(self, exc_type, exc_value, traceback)
1240
- # class With_exit:
1238
+ def test_enter ():
1239
+ with With_enter ():
1240
+ pass
1241
1241
1242
- # def __exit__(self, exc_type, exc_value, traceback):
1243
- # OK()
1244
- # return "" # edit to match type
1242
+ # object.__exit__(self, exc_type, exc_value, traceback)
1243
+ class With_exit :
1244
+
1245
+ def __enter__ (self ):
1246
+ return
1245
1247
1246
- # def test_exit( ):
1247
- # with_exit = With_exit ()
1248
- # exit(with_exit) # edit to effect call
1248
+ def __exit__ ( self , exc_type , exc_value , traceback ):
1249
+ OK ()
1250
+ return
1249
1251
1252
+ def test_exit ():
1253
+ with With_exit ():
1254
+ pass
1250
1255
1251
1256
# # 3.4.1. Awaitable Objects
1252
1257
# # object.__await__(self)
0 commit comments