Skip to content

Commit a285081

Browse files
committed
reformat with black
1 parent 33b68fd commit a285081

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

pants-plugins/uses_services/mongo_rules.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class UsesMongoRequest:
5050
In st2 code, they come from:
5151
oslo_config.cfg.CONF.database.{host,port,db_name,connection_timeout}
5252
"""
53+
5354
# These config opts currently hard-coded in:
5455
# for unit tests: st2tests/st2tests/config.py
5556
# for integration tests: conf/st2.tests*.conf st2tests/st2tests/fixtures/conf/st2.tests*.conf
@@ -86,7 +87,7 @@ def is_applicable(cls, target: Target) -> bool:
8687
level=LogLevel.DEBUG,
8788
)
8889
async def mongo_is_running_for_pytest(
89-
request: PytestUsesMongoRequest
90+
request: PytestUsesMongoRequest,
9091
) -> PytestPluginSetup:
9192
# TODO: delete these comments once the Makefile becomes irrelevant.
9293
# the comments explore how the Makefile prepares to run and runs tests

pants-plugins/uses_services/mongo_rules_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
MongoIsRunning,
3434
PytestUsesMongoRequest,
3535
UsesMongoRequest,
36-
rules as mongo_rules
36+
rules as mongo_rules,
3737
)
3838
from .platform_rules import Platform
3939
from .target_types import UsesServicesField
@@ -110,11 +110,11 @@ def platform(
110110

111111

112112
# TODO: this requires that mongo be running...
113-
#def test_is_running(rule_runner: RuleRunner) -> None:
113+
# def test_is_running(rule_runner: RuleRunner) -> None:
114114
# request = UsesMongoRequest()
115115
# mock_platform = platform()
116116

117-
# we are asserting that this does not raise an exception
117+
# we are asserting that this does not raise an exception
118118
# is_running = run_mongo_is_running(rule_runner, request, mock_platform)
119119
# assert is_running
120120

@@ -176,7 +176,7 @@ def platform(
176176
def test_not_running(rule_runner: RuleRunner, mock_platform: Platform) -> None:
177177
request = UsesMongoRequest(
178178
db_host="127.100.20.7",
179-
db_port=10, # unassigned port, unlikely to be used
179+
db_port=10, # unassigned port, unlikely to be used
180180
)
181181

182182
with pytest.raises(ExecutionError) as exception_info:
@@ -187,7 +187,7 @@ def test_not_running(rule_runner: RuleRunner, mock_platform: Platform) -> None:
187187

188188
exc = execution_error.wrapped_exceptions[0]
189189
assert isinstance(exc, ServiceMissingError)
190-
190+
191191
assert exc.service == "mongo"
192192
assert "The mongo service does not seem to be running" in str(exc)
193193
assert exc.instructions != ""

0 commit comments

Comments
 (0)