def _get_affinity(self, affinity): return get_affinity(affinity=affinity, default_affinity=conf.get(AFFINITIES_EXPERIMENTS))
def _get_affinity(self, affinity): return get_affinity(affinity=affinity, default_affinity=conf.get(AFFINITIES_TENSORBOARDS))
def _get_affinity(self, affinity): return get_affinity(affinity=affinity, default_affinity=conf.get(AFFINITIES_JOBS))
def test_pod_affinity(self): assert get_affinity(None, None) is None assert get_affinity({'foo': 'bar'}, None) == {'foo': 'bar'} assert get_affinity(None, {"foo": "bar"}) == {'foo': 'bar'} assert get_affinity({'foo': 'bar'}, {"foo": "moo"}) == {'foo': 'bar'}