Skip to content

Commit

Permalink
Hacky make codecov see new lines are tested.
Browse files Browse the repository at this point in the history
  • Loading branch information
danthedeckie committed Oct 4, 2024
1 parent 5c38a5c commit 07f3363
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test_simpleeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,9 @@ class Foo:
def bar(self):
yield "Hello, world!"

# Test the genertor does work - also adds the `yield` to codecov...
assert list(Foo().bar()) == ["Hello, world!"]

evil = "foo.bar().gi_frame.f_globals['__builtins__'].exec('raise RuntimeError(\"Oh no\")')"

with self.assertRaises(FeatureNotAvailable):
Expand Down

0 comments on commit 07f3363

Please sign in to comment.