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
While using function_scoped_container_getter argument, randomly observing the following error message. It is happening randomly for one in hundred testcases.
docker_project = <compose.project.Project object at 0x7f5b12598c18>
request = <SubRequest 'function_scoped_container_getter' for
@pytest.fixture(scope=scope) # type: ignore
def scoped_containers_fixture(docker_project: Project, request):
now = datetime.utcnow()
if request.config.getoption("--use-running-containers"):
containers = docker_project.containers() # type: List[Container]
else:
if any(docker_project.containers()):
raise ContainersAlreadyExist(
'pytest-docker-compose tried to start containers but there are'
' already running containers: %s, you probably scoped your'
' tests wrong' % docker_project.containers())
containers = docker_project.up()
if not containers:
raise ValueError("`docker-compose` didn't launch any containers!")
container_getter = ContainerGetter(docker_project)
yield container_getter
if request.config.getoption("--verbose"):
for container in sorted(containers, key=lambda c: c.name):
header = "Logs from {name}:".format(name=container.name)
print(header, '\n', "=" * len(header))
print(container.logs(since=now).decode("utf-8", errors="replace")
or "(no logs)", '\n')
E UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 1260: ordinal not in range(128)
Pytest version - pytest 6.2.4
While using function_scoped_container_getter argument, randomly observing the following error message. It is happening randomly for one in hundred testcases.
docker_project = <compose.project.Project object at 0x7f5b12598c18>
request = <SubRequest 'function_scoped_container_getter' for
E UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 1260: ordinal not in range(128)
/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pytest_docker_compose/init.py:198: UnicodeEncodeError
The text was updated successfully, but these errors were encountered: