fix: Add Marine Use #1502
fix: Add Marine Use #1502
232 errors, 270 pass in 1m 7s
Annotations
Check failure on line 0 in lcfs.tests.admin_adjustment.test_admin_adjustment
github-actions / Backend Test Results
test_create_admin_adjustment (lcfs.tests.admin_adjustment.test_admin_adjustment) with error
backend/pytest-results.xml [took 4s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.admin_adjustment.test_admin_adjustment
github-actions / Backend Test Results
test_get_admin_adjustment (lcfs.tests.admin_adjustment.test_admin_adjustment) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.admin_adjustment.test_admin_adjustment
github-actions / Backend Test Results
test_get_admin_adjustment_unauthorized (lcfs.tests.admin_adjustment.test_admin_adjustment) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.admin_adjustment.test_admin_adjustment
github-actions / Backend Test Results
test_get_admin_adjustment_not_found (lcfs.tests.admin_adjustment.test_admin_adjustment) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.admin_adjustment.test_admin_adjustment
github-actions / Backend Test Results
test_update_admin_adjustment (lcfs.tests.admin_adjustment.test_admin_adjustment) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.admin_adjustment.test_admin_adjustment
github-actions / Backend Test Results
test_fail_update_processed_admin_adjustment (lcfs.tests.admin_adjustment.test_admin_adjustment) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.audit_log.test_audit_log_views
github-actions / Backend Test Results
test_get_audit_logs_paginated_success (lcfs.tests.audit_log.test_audit_log_views) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.audit_log.test_audit_log_views
github-actions / Backend Test Results
test_get_audit_logs_paginated_forbidden (lcfs.tests.audit_log.test_audit_log_views) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.audit_log.test_audit_log_views
github-actions / Backend Test Results
test_get_audit_log_by_id_success (lcfs.tests.audit_log.test_audit_log_views) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.audit_log.test_audit_log_views
github-actions / Backend Test Results
test_get_audit_log_by_id_not_found (lcfs.tests.audit_log.test_audit_log_views) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_all_compliance_periods (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_period_success (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_period_not_found (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_report_success (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_report_not_found (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_report_status_by_desc_success (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_report_status_by_desc_unknown_status (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_add_compliance_report_success (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_add_compliance_report_exception (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_add_compliance_report_history_success (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_add_compliance_report_history_exception (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_reports_paginated_success (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_report_by_id_success_is_not_model (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_report_by_id_success_is_model (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError
Check failure on line 0 in lcfs.tests.compliance_report.test_compliance_report_repo
github-actions / Backend Test Results
test_get_compliance_report_by_id_success_not_found (lcfs.tests.compliance_report.test_compliance_report_repo) with error
backend/pytest-results.xml [took 0s]
Raw output
failed on setup with "subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1."
anyio_backend = 'asyncio', args = (), kwargs = {}, backend_name = 'asyncio'
backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f3bd56982e0>
def wrapper(*args, anyio_backend, **kwargs): # type: ignore[no-untyped-def]
backend_name, backend_options = extract_backend_and_options(anyio_backend)
if has_backend_arg:
kwargs["anyio_backend"] = anyio_backend
with get_runner(backend_name, backend_options) as runner:
if isasyncgenfunction(func):
> yield from runner.run_asyncgen_fixture(func, kwargs)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/pytest_plugin.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2094: in run_asyncgen_fixture
self._loop.run_until_complete(f)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2074: in fixture_runner
retval = await agen.asend(None)
lcfs/conftest.py:69: in _engine
subprocess.run(["alembic", "upgrade", "head"], check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = (['alembic', 'upgrade', 'head'],), kwargs = {}
process = <Popen: returncode: 1 args: ['alembic', 'upgrade', 'head']>
stdout = None, stderr = None, retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['alembic', 'upgrade', 'head']' returned non-zero exit status 1.
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/subprocess.py:526: CalledProcessError