Skip to content

Commit

Permalink
Merge branch '1.2' into 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jun 26, 2018
2 parents 8acc0fb + 0e9b280 commit 42209cc
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 @@ -60,10 +60,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 42209cc

Please sign in to comment.