Skip to content

Commit

Permalink
Yapf updates
Browse files Browse the repository at this point in the history
  • Loading branch information
drobison00 committed Jun 14, 2023
1 parent caef945 commit 306f7d5
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions python/tests/test_segment_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@


def test_py_end_to_end():

def gen_data_1():
yield True
yield False
Expand Down Expand Up @@ -134,13 +135,15 @@ def test_py_constructor():


def test_py_module_initialization():

def gen_data():
yield True
yield False
yield True
yield True

def init_wrapper(builder: mrc.Builder):

def on_next(input):
pass

Expand Down Expand Up @@ -199,6 +202,7 @@ def on_complete():


def test_py_module_as_source():

def init_wrapper(builder: mrc.Builder):
global packet_count
packet_count = 0
Expand Down Expand Up @@ -235,6 +239,7 @@ def on_complete():


def test_py_module_as_sink():

def gen_data():
for i in range(0, 43):
yield True
Expand Down Expand Up @@ -265,6 +270,7 @@ def init_wrapper(builder: mrc.Builder):


def test_py_module_chaining():

def init_wrapper(builder: mrc.Builder):
global packet_count
packet_count = 0
Expand Down Expand Up @@ -304,6 +310,7 @@ def on_complete():


def test_py_module_nesting():

def init_wrapper(builder: mrc.Builder):
global packet_count
packet_count = 0
Expand Down Expand Up @@ -339,6 +346,7 @@ def on_complete():


def test_py_modules_dont_overwrite():

def init_wrapper(builder: mrc.Builder):
global packet_count
packet_count = 0
Expand All @@ -358,8 +366,11 @@ def on_complete():

# Make sure we can't re-register the same name
with pytest.raises(RuntimeError):
this_should_fail = builder.load_module("NestedModule", "mrc_unittest", "ModuleNestingTest_mod1", # noqa
{}) # noqa
this_should_fail = builder.load_module(
"NestedModule",
"mrc_unittest",
"ModuleNestingTest_mod1", # noqa
{}) # noqa

nested_mod2 = builder.load_module("NestedModule", "mrc_unittest", "ModuleNestingTest_mod2", {})
nested_sink = builder.make_sink("nested_sink", on_next, on_error, on_complete)
Expand All @@ -382,7 +393,7 @@ def on_complete():
assert packet_count == 8


if (__name__ in ("__main__",)):
if (__name__ in ("__main__", )):
test_py_end_to_end()
test_py_module_as_source()
test_py_module_as_sink()
Expand Down

0 comments on commit 306f7d5

Please sign in to comment.