Skip to content

Commit

Permalink
Merge branch '1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jun 26, 2018
2 parents b065b3e + 42209cc commit d1f254f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def folders_configurable(self, ctx):
# Just config -> works fine
ctx.blacken = dict(folders=["elsewhere"])
blacken(ctx)
assert "elsewhere" in ctx.run.call_args[0][0]
assert "elsewhere" in ctx.run_command

def folders_config_loses_to_runtime(self, ctx):
# Config + CLI opt -> CLI opt wins
ctx.blacken = dict(folders=["nowhere"])
blacken(ctx, folders=["nowhere"])
assert "nowhere" in ctx.run.call_args[0][0]
assert "nowhere" in ctx.run_command
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
@fixture
def ctx():
# TODO: make MockContext more usable in a "don't care about results" mode
# NOTE: this is ugly but whatever.
MockContext.run_command = property(lambda self: self.run.call_args[0][0])
mc = MockContext(run=Result())
mc._set(run=Mock(wraps=mc.run))
yield mc

0 comments on commit d1f254f

Please sign in to comment.