[Core] Disable formatting in test_add_min_workers_nodes (#21322)

Black errors while formatting `test_resource_demand_scheduler.py`. The issue is caused by the [assertions](https://github.com/ray-project/ray/blob/master/python/ray/tests/test_resource_demand_scheduler.py#L383-L428) at the end of `test_add_min_workers_nodes`. 



To prevent `format.sh` from erroring once we switch to Black, I've disabled formatting around the assertions.
This commit is contained in:
Balaji Veeramani 2022-01-01 20:16:33 -06:00 committed by GitHub
parent 416bce6378
commit fae5b9b1af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -380,6 +380,10 @@ def test_add_min_workers_nodes():
"max_workers": 0,
},
}
# Formatting is disabled to prevent Black from erroring while formatting
# this file. See https://github.com/ray-project/ray/issues/21313 for more
# information.
# yapf: disable
assert _add_min_workers_nodes([],
{},
types, None, None, None) == \
@ -426,6 +430,7 @@ def test_add_min_workers_nodes():
}, {
"gpubla": 10
})
# yapf: enable
def test_get_nodes_to_launch_with_min_workers():