Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions t/unit/test_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ class CannotThen:
pass


class test_Thenable:
def test_isa():
assert isinstance(CanThen(), Thenable)
assert not isinstance(CannotThen(), Thenable)

def test_isa(self):
assert isinstance(CanThen(), Thenable)
assert not isinstance(CannotThen(), Thenable)

def test_promise(self):
assert isinstance(promise(lambda x: x), Thenable)
def test_promise():
assert isinstance(promise(lambda x: x), Thenable)
20 changes: 10 additions & 10 deletions t/unit/test_funtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ def filter_key_value(key, filter_, mapping):
x({})


class test_maybe_promise:
def test_when_none():
assert maybe_promise(None) is None

def test_when_none(self):
assert maybe_promise(None) is None

def test_when_promise(self):
p = promise()
assert maybe_promise(p) is p
def test_when_promise():
p = promise()
assert maybe_promise(p) is p

def test_when_other(self):
m = Mock()
p = maybe_promise(m)
assert isinstance(p, Thenable)

def test_when_other():
m = Mock()
p = maybe_promise(m)
assert isinstance(p, Thenable)


def test_starpromise():
Expand Down
Loading