<commit_before>import socket

import pytest

import portend


def socket_infos():
	"""
	Generate addr infos for connections to localhost
	"""
	host = None
	port = portend.find_available_local_port()
	family = socket.AF_UNSPEC
	socktype = socket.SOCK_STREAM
	return socket.getaddrinfo(host, port, family, socktype)


def id_for_info(info):
	af, = info[:1]
	return str(af)

def build_addr_infos():
	params = list(socket_infos())
	ids = list(map(id_for_info, params))
	return locals()


@pytest.fixture(**build_addr_infos())
def listening_addr(request):
	af, socktype, proto, canonname, sa = request.param<commit_msg>Add indication of what None means<commit_after>import socket

import pytest

import portend


def socket_infos():
	"""
	Generate addr infos for connections to localhost
	"""
	host = None  # all available interfaces
	port = portend.find_available_local_port()
	family = socket.AF_UNSPEC
	socktype = socket.SOCK_STREAM
	return socket.getaddrinfo(host, port, family, socktype)


def id_for_info(info):
	af, = info[:1]
	return str(af)

def build_addr_infos():
	params = list(socket_infos())
	ids = list(map(id_for_info, params))
	return locals()


@pytest.fixture(**build_addr_infos())
def listening_addr(request):
	af, socktype, proto, canonname, sa = request.param
{'fraction_non_alphanumeric': 0.11050156739811912, 'fraction_numerical': 0.001567398119122257, 'mean_word_length': 5.68586387434555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3574058', 'n_tokens_mistral': 450, 'n_tokens_neox': 438, 'n_words': 111}