Skip to content

Commit 2fd748a

Browse files
committed
Remove duplicated asserts and fix variable names
1 parent 391d15f commit 2fd748a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.pydevproject

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?eclipse-pydev version="1.0"?><pydev_project>
33
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
4-
<path>/${PROJECT_DIR_NAME}</path>
4+
<path>/${PROJECT_DIR_NAME}/src</path>
55
</pydev_pathproperty>
66
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
77
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>

src/oop_ext/foundation/callback/_tests/test_callback.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def After2(*args, **kwargs):
667667
c()
668668
assert self.called == 1
669669

670-
def testAfterBeforeHandleError(self, mocker):
670+
def testAfterBeforeHandleError(self):
671671
class C:
672672
def Method(self, x):
673673
return x * 2
@@ -694,12 +694,6 @@ def BeforeMethod(*args):
694694
assert self.before_called == 1
695695
assert self.after_called == 0
696696

697-
with pytest.raises(RuntimeError):
698-
assert c.Method(20) == 40
699-
700-
assert self.before_called == 2
701-
assert self.after_called == 0
702-
703697
def testKeyReusedAfterDead(self, monkeypatch):
704698
self._gotten_key = False
705699

@@ -1055,6 +1049,6 @@ def SetValue(self, value):
10551049
def _UpdateAValue(self, new_value):
10561050
self._a.SetValue(new_value)
10571051

1058-
a = B()
1052+
b = B()
10591053
with pytest.raises(ZeroDivisionError):
1060-
a.SetValue(5)
1054+
b.SetValue(5)

0 commit comments

Comments
 (0)