Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_by_priority(self):
_arch = get_arch_name()
assert get_policy_name(80) == 'manylinux2014_{}'.format(_arch)
if _arch in {'x86_64', 'i686'}:
assert get_policy_name(90) == 'manylinux2010_{}'.format(_arch)
assert get_policy_name(100) == 'manylinux1_{}'.format(_arch)
assert get_policy_name(0) == 'linux_{}'.format(_arch)
def test_get_by_priority(self):
_arch = get_arch_name()
assert get_policy_name(80) == 'manylinux2014_{}'.format(_arch)
if _arch in {'x86_64', 'i686'}:
assert get_policy_name(90) == 'manylinux2010_{}'.format(_arch)
assert get_policy_name(100) == 'manylinux1_{}'.format(_arch)
assert get_policy_name(0) == 'linux_{}'.format(_arch)
def test_get_by_priority(self):
_arch = get_arch_name()
assert get_policy_name(80) == 'manylinux2014_{}'.format(_arch)
if _arch in {'x86_64', 'i686'}:
assert get_policy_name(90) == 'manylinux2010_{}'.format(_arch)
assert get_policy_name(100) == 'manylinux1_{}'.format(_arch)
assert get_policy_name(0) == 'linux_{}'.format(_arch)
(e['priority'] for e in external_refs.values() if len(e['libs']) == 0),
default=POLICY_PRIORITY_LOWEST)
if has_ucs2:
ucs_policy = POLICY_PRIORITY_LOWEST
else:
ucs_policy = POLICY_PRIORITY_HIGHEST
if uses_PyFPE_jbuf:
pyfpe_policy = POLICY_PRIORITY_LOWEST
else:
pyfpe_policy = POLICY_PRIORITY_HIGHEST
ref_tag = get_policy_name(ref_policy)
sym_tag = get_policy_name(symbol_policy)
ucs_tag = get_policy_name(ucs_policy)
pyfpe_tag = get_policy_name(pyfpe_policy)
overall_tag = get_policy_name(min(symbol_policy, ref_policy, ucs_policy,
pyfpe_policy))
return WheelAbIInfo(overall_tag, external_refs, ref_tag, versioned_symbols,
sym_tag, ucs_tag, pyfpe_tag)
if has_ucs2:
ucs_policy = POLICY_PRIORITY_LOWEST
else:
ucs_policy = POLICY_PRIORITY_HIGHEST
if uses_PyFPE_jbuf:
pyfpe_policy = POLICY_PRIORITY_LOWEST
else:
pyfpe_policy = POLICY_PRIORITY_HIGHEST
ref_tag = get_policy_name(ref_policy)
sym_tag = get_policy_name(symbol_policy)
ucs_tag = get_policy_name(ucs_policy)
pyfpe_tag = get_policy_name(pyfpe_policy)
overall_tag = get_policy_name(min(symbol_policy, ref_policy, ucs_policy,
pyfpe_policy))
return WheelAbIInfo(overall_tag, external_refs, ref_tag, versioned_symbols,
sym_tag, ucs_tag, pyfpe_tag)
ref_policy = max(
(e['priority'] for e in external_refs.values() if len(e['libs']) == 0),
default=POLICY_PRIORITY_LOWEST)
if has_ucs2:
ucs_policy = POLICY_PRIORITY_LOWEST
else:
ucs_policy = POLICY_PRIORITY_HIGHEST
if uses_PyFPE_jbuf:
pyfpe_policy = POLICY_PRIORITY_LOWEST
else:
pyfpe_policy = POLICY_PRIORITY_HIGHEST
ref_tag = get_policy_name(ref_policy)
sym_tag = get_policy_name(symbol_policy)
ucs_tag = get_policy_name(ucs_policy)
pyfpe_tag = get_policy_name(pyfpe_policy)
overall_tag = get_policy_name(min(symbol_policy, ref_policy, ucs_policy,
pyfpe_policy))
return WheelAbIInfo(overall_tag, external_refs, ref_tag, versioned_symbols,
sym_tag, ucs_tag, pyfpe_tag)