Enforce quoting style in Travis. (#4589)

This commit is contained in:
justinwyang
2019-04-11 14:24:26 -07:00
committed by Robert Nishihara
parent 6697407ec4
commit e88e706fcc
79 changed files with 777 additions and 778 deletions
+3 -3
View File
@@ -388,7 +388,7 @@ class AutoscalingTest(unittest.TestCase):
rtc1.clear()
autoscaler.update()
# Synchronization: wait for launchy thread to be blocked on rtc1
if hasattr(rtc1, '_cond'): # Python 3.5
if hasattr(rtc1, "_cond"): # Python 3.5
waiters = rtc1._cond._waiters
else: # Python 2.7
waiters = rtc1._Event__cond._Condition__waiters
@@ -539,9 +539,9 @@ class AutoscalingTest(unittest.TestCase):
def testReportsConfigFailures(self):
config = copy.deepcopy(SMALL_CLUSTER)
config['provider']['type'] = 'external'
config["provider"]["type"] = "external"
config = fillout_defaults(config)
config['provider']['type'] = 'mock'
config["provider"]["type"] = "mock"
config_path = self.write_config(config)
self.provider = MockProvider()
runner = MockProcessRunner(fail_cmds=["cmd1"])
+1 -1
View File
@@ -2678,7 +2678,7 @@ def test_raylet_is_robust_to_random_messages(ray_start_regular):
# Try to bring down the node manager:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((node_manager_address, node_manager_port))
s.send(1000 * b'asdf')
s.send(1000 * b"asdf")
@ray.remote
def f():
+5 -5
View File
@@ -24,18 +24,18 @@ class CredisTest(unittest.TestCase):
def test_credis_started(self):
assert "redis_address" in self.config
primary = parse_client(self.config['redis_address'])
primary = parse_client(self.config["redis_address"])
assert primary.ping() is True
member = primary.lrange('RedisShards', 0, -1)[0]
member = primary.lrange("RedisShards", 0, -1)[0]
shard = parse_client(member.decode())
# Check that primary has loaded credis' master module.
chain = primary.execute_command('MASTER.GET_CHAIN')
# Check that primary has loaded credis's master module.
chain = primary.execute_command("MASTER.GET_CHAIN")
assert len(chain) == 1
# Check that the shard has loaded credis' member module.
assert chain[0] == member
assert shard.execute_command('MEMBER.SN') == -1
assert shard.execute_command("MEMBER.SN") == -1
if __name__ == "__main__":
+1 -1
View File
@@ -702,7 +702,7 @@ def test_connect_with_disconnected_node(shutdown_only):
# This node is killed by SIGTERM, ray_monitor will not mark it again.
removing_node = cluster.add_node(num_cpus=0, _internal_config=config)
cluster.remove_node(removing_node, allow_graceful=True)
with pytest.raises(Exception, match=('Timing out of wait.')):
with pytest.raises(Exception, match=("Timing out of wait.")):
wait_for_errors(ray_constants.REMOVED_NODE_ERROR, 3, timeout=2)
# There is no connection error to a dead node.
info = relevant_errors(ray_constants.RAYLET_CONNECTION_ERROR)
+1 -1
View File
@@ -79,7 +79,7 @@ def _test_cleanup_on_driver_exit(num_redis_shards):
ray.shutdown()
success = multiprocessing.Value('b', False)
success = multiprocessing.Value("b", False)
driver = multiprocessing.Process(target=Driver, args=(success, ))
driver.start()
# Wait for client to exit.
+1 -1
View File
@@ -41,7 +41,7 @@ def run_and_get_output(command):
p = subprocess.Popen(command, stdout=tmp, stderr=tmp)
if p.wait() != 0:
raise RuntimeError("ray start did not terminate properly")
with open(tmp.name, 'r') as f:
with open(tmp.name, "r") as f:
result = f.readlines()
return "\n".join(result)