Skip to content

Commit

Permalink
Remove junk changes from hot reload debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHutchison committed Nov 30, 2023
1 parent 02975b9 commit 556f0e8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions tests/unit/test_megapatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

class TestMegaPatchContext:
def test_active_patches(self) -> None:
"foosssss"
megapatch_context = MegaPatchContext()
megapatch = MegaMock.it(MegaPatch)
megapatch_context.add(megapatch)
Expand Down Expand Up @@ -73,23 +72,18 @@ def test_delete(self) -> None:


class TestMegaPatchPatching:
"Eerrreeeteees"

def test_patch_class_itself(self) -> None:
"feeeeeeeeee"
patch = MegaPatch.it(Foo)
patch.new_value.z = "a"

assert Foo.z == "a"
Foo("s") # should work
# something

# sanity check, instance should NOT work because it doesn't support calling
with pytest.raises(TypeError):
Foo("s")() # type: ignore

def test_patch_class_instance_from_type(self) -> None:
"ssssstteeeets"
"eeeeeffeeeeeeerrr"
patch = MegaPatch.it(Foo)
patch.return_value.z = "b"

Expand All @@ -112,11 +106,7 @@ def test_patch_class_attribute(self) -> None:
assert Foo.moo == "dog"

def test_patch_class_method_supports_return_value_as_arg(self) -> None:
"fooffff"
"barsss"
"moo"
MegaPatch.it(Foo.some_method, return_value="foo")

assert Foo("s").some_method() == "foo"

def test_patch_class_method_from_module_reference(self) -> None:
Expand Down

0 comments on commit 556f0e8

Please sign in to comment.