File tree 2 files changed +17
-5
lines changed
python-programming/examples/pytest/b1
2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
2
from banks import Bank , NegativeDeposite
3
3
4
+
4
5
def test_negative_deposit ():
5
6
b = Bank (10 )
6
7
with pytest .raises (Exception ) as exinfo :
7
8
b .deposit (- 1 )
8
9
assert exinfo .type == NegativeDeposite
9
- assert str (exinfo .value ) == 'Cannot deposit negative sum'
10
+ assert str (exinfo .value ) == 'Cannot deposit negative sum'
Original file line number Diff line number Diff line change 1
1
[flake8]
2
2
ignore =
3
+ python-programming/examples/sqla/metadata.py ALL
4
+ python-programming/examples/twisted/web_client.py ALL
5
+ python-programming/examples/strings/infinite_while_many_conditions.py ALL
6
+ python-programming/examples/functions/named_and_positional_params.py ALL
7
+ python-programming/examples/regex/match_unicode.py ALL
8
+ python-programming/examples/jupyter/planets.py ALL
9
+ # Python 2:
10
+ python-programming/examples/2to3/div2.py ALL
11
+ python-programming/examples/2to3/print2.py ALL
12
+ python-programming/examples/basics/print.py ALL
3
13
*.py E111 E114 E115 E116 E117 E121 E123 E124 E126 E127 E128 E129 \
4
- E201 E202 E203 E211 E221 E222 E225 E226 E231 E241 E251 E261 E262 E265 E266 E271 E272 \
5
- E301 E302 E303 E305 E306 E401 E402 E403 E405 E501 E701 E702 E703 E711 E713 E731 E741 E999 \
6
- F401 F403 F405 F821 F823 F841 \
7
- W291 W292 W293 W391 W605
14
+ E201 E202 E203 E211 E221 E222 E225 E226 E231 E241 E251 E261 E262 E265 E266 E271 E272 \
15
+ E301 E302 E303 E305 E306 E401 E402 E403 E405 E501 E701 E702 E703 E711 E713 E731 E741 E999 \
16
+ F401 F403 F405 F821 F823 F841 \
17
+ W291 W292 W293 W391 W605
8
18
# TODO
9
19
# E999
10
20
# E114
@@ -14,3 +24,4 @@ ignore =
14
24
# F401
15
25
# E401
16
26
# W605
27
+
You can’t perform that action at this time.
0 commit comments