You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am trying to test if this is compatiblewith windows with folowing code
deftest_example_postgres(postgresql):
"""Check main postgresql fixture."""cur=postgresql.cursor()
cur.execute("CREATE TABLE test (id serial PRIMARY KEY, num integer, data varchar);")
postgresql.commit()
cur.close()
What are the results
exception is thrown
test setup failed
request = <SubRequest 'postgresql' for <Function test_example_postgres>>
@pytest.fixture
def postgresql_factory(request: FixtureRequest) -> Iterator[connection]:
"""
Fixture factory for PostgreSQL.
:param request: fixture request object
:returns: postgresql client
"""
check_for_psycopg()
> proc_fixture: Union[PostgreSQLExecutor, NoopExecutor] = request.getfixturevalue(
process_fixture_name
)
..\..\AppData\Roaming\Python\Python310\site-packages\pytest_postgresql\factories\client.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\AppData\Roaming\Python\Python310\site-packages\pytest_postgresql\factories\process.py:119: in postgresql_proc_fixture
pg_port = get_port(port) or get_port(config["port"])
..\..\AppData\Roaming\Python\Python310\site-packages\port_for\api.py:169: in get_port
return select_random(None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ports = {5368, 5369, 5370, 5371, 5372, 5373, ...}, exclude_ports = set()
def select_random(
ports: Optional[Set[int]] = None,
exclude_ports: Optional[Iterable[int]] = None,
) -> int:
"""
Returns random unused port number.
"""
if ports is None:
ports = available_good_ports()
if exclude_ports is None:
exclude_ports = set()
ports.difference_update(set(exclude_ports))
for port in random.sample(tuple(ports), min(len(ports), 100)):
if not port_is_used(port):
return port
> raise PortForException("Can't select a port")
E port_for.exceptions.PortForException: Can't select a port
..\..\AppData\Roaming\Python\Python310\site-packages\port_for\api.py:34: PortForException
What are the expected results
windows should be suported
suported OS shoud be stated
instalation on untested OS should be disabled
system details
Python 3.10.4
Psycopg 3.0.15
pytest-postgresql 4.1.1
port-for 0.6.2
The text was updated successfully, but these errors were encountered:
What action do you want to perform
i am trying to test if this is compatiblewith windows with folowing code
What are the results
exception is thrown
What are the expected results
system details
The text was updated successfully, but these errors were encountered: