Skip to content

Commit

Permalink
fix: correct usage of xfail
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Jan 26, 2023
1 parent 41d3411 commit 637521e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ relative_files = True

[bdist_wheel]
universal=1

[tool:pytest]
xfail_strict=true
7 changes: 2 additions & 5 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if eval("0"):
global_never_defined = 1

only_new_algo=pytest.mark.skipif( not use_new_algo, reason="Not supported by the SentinelNodeFinder")
only_new_algo=pytest.mark.xfail( not use_new_algo, reason="Not supported by the SentinelNodeFinder")

def calling_expression():
frame = inspect.currentframe().f_back.f_back
Expand Down Expand Up @@ -430,7 +430,6 @@ def test_attr(self):
c.x = c.y = tester
str((c.x.x, c.x.y, c.y.x, c.y.y, c.x.asd, c.y.qwe))

@only_new_algo
def test_store_attr_multiline(self):
tester.x \
.y = 1
Expand Down Expand Up @@ -481,7 +480,6 @@ def test_del_attr_multiline(self):
del tester. \
x.y

@only_new_algo
def test_method_call_multiline(self):

tester.method(
Expand All @@ -500,7 +498,6 @@ def test_method_call_multiline(self):
(tester).\
b(5)

@only_new_algo
def test_call_things(self):
# call things which are no methods or functions

Expand Down Expand Up @@ -569,7 +566,7 @@ def foo():
@only_new_algo
def test_with(self):
#TODO only __exit__ does not work
if py9:
if py8 and not py10:
pytest.xfail()

with tester:
Expand Down

0 comments on commit 637521e

Please sign in to comment.