Skip to content

Commit

Permalink
Fix linting and tests neglected from last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebrennan committed May 11, 2020
1 parent 41cb601 commit 30a5bc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/cutest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ def fixture(self, obj) -> 'FixtureDefinition':
block. Any cleanup should happen inside of an attached finally
block.
"""
if (
inspect.isclass(obj)
and hasattr(obj, '__enter__')
and hasattr(obj, '__exit__')
):
if inspect.isclass(obj) and hasattr(obj, '__enter__') and hasattr(obj, '__exit__'):
return FixtureDefinition(self, obj)
elif inspect.isgeneratorfunction(obj):
cm = contextmanager(obj)
Expand Down
3 changes: 2 additions & 1 deletion test/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
class RunnerTest(unittest.TestCase):

def test_prune(self):
runner = cutest.SerialRunner()
test_output = cutest.default_output_stream()
runner = cutest.SerialRunner(test_output, verbosity=1)
sample.my_suite.initialize()
pruned = list(runner.pruned_suites(sample.test_1.calls))
self.assertEqual(len(pruned), 1)

0 comments on commit 30a5bc3

Please sign in to comment.