# Path: pgctl/poll_ready.py
# def floatfile(filename):
# def getval(filename, envname, default):
# def check_ready():
# def wait_for_down_signal(down_fifo, seconds):
# def pgctl_poll_ready(down_fifo, notification_fd, timeout, poll_ready, poll_down, check_ready=check_ready):
# def main():


import os
import pytest
from unittest import mock
from pgctl import poll_ready




@pytest.fixture(autouse=True)
def in_tmpdir(tmpdir):
    with tmpdir.as_cwd():
        yield


class DescribeFloatFile:

    def it_loads_files(self):
        filename = 'notification-fd'
        with open(filename, 'w') as f:
            f.write('5')

# Path: pgctl/poll_ready.py
# def floatfile(filename):
# def getval(filename, envname, default):
# def check_ready():
# def wait_for_down_signal(down_fifo, seconds):
# def pgctl_poll_ready(down_fifo, notification_fd, timeout, poll_ready, poll_down, check_ready=check_ready):
# def main():


# Path: tests/unit/poll_ready_test.py
import os
import pytest
from unittest import mock
from pgctl import poll_ready





@pytest.fixture(autouse=True)
def in_tmpdir(tmpdir):
    with tmpdir.as_cwd():
        yield


class DescribeFloatFile:

    def it_loads_files(self):
        filename = 'notification-fd'
        with open(filename, 'w') as f:
            f.write('5')

        result = poll_ready.floatfile(filename)