Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ============================================================================================== test session starts ===============================================================================================
- platform linux -- Python 3.7.1, pytest-4.0.2, py-1.7.0, pluggy-0.8.0
- rootdir: /mnt/home/evan/Sources/aur/borgmatic/src/borgmatic, inifile:
- collected 219 items
- tests/end-to-end/test_borgmatic.py F [ 0%]
- tests/integration/commands/test_borgmatic.py ........................F [ 11%]
- tests/integration/commands/test_convert_config.py .... [ 13%]
- tests/integration/commands/test_generate_config.py .. [ 14%]
- tests/integration/config/test_generate.py ............ [ 20%]
- tests/integration/config/test_legacy.py . [ 20%]
- tests/integration/config/test_validate.py ........ [ 24%]
- tests/unit/test_verbosity.py .. [ 25%]
- tests/unit/borg/test_check.py .......................... [ 36%]
- tests/unit/borg/test_create.py ............................................. [ 57%]
- tests/unit/borg/test_environment.py .... [ 59%]
- tests/unit/borg/test_extract.py ....... [ 62%]
- tests/unit/borg/test_hook.py ... [ 63%]
- tests/unit/borg/test_info.py ....... [ 67%]
- tests/unit/borg/test_init.py ........ [ 70%]
- tests/unit/borg/test_list.py ....... [ 73%]
- tests/unit/borg/test_prune.py .......... [ 78%]
- tests/unit/commands/test_borgmatic.py .... [ 80%]
- tests/unit/config/test_checks.py ... [ 81%]
- tests/unit/config/test_collect.py ......... [ 85%]
- tests/unit/config/test_convert.py ......... [ 89%]
- tests/unit/config/test_generate.py . [ 90%]
- tests/unit/config/test_legacy.py ............. [ 96%]
- tests/unit/config/test_validate.py ........ [100%]
- ==================================================================================================== FAILURES ====================================================================================================
- _____________________________________________________________________________________________ test_borgmatic_command _____________________________________________________________________________________________
- def test_borgmatic_command():
- # Create a Borg repository.
- temporary_directory = tempfile.mkdtemp()
- repository_path = os.path.join(temporary_directory, 'test.borg')
- try:
- config_path = os.path.join(temporary_directory, 'test.yaml')
- generate_configuration(config_path, repository_path)
- subprocess.check_call(
- > 'borgmatic -v 2 --config {} --init --encryption repokey'.format(config_path).split(' ')
- )
- tests/end-to-end/test_borgmatic.py:42:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- popenargs = (['borgmatic', '-v', '2', '--config', '/tmp/tmpqrru9c3w/test.yaml', '--init', ...],), kwargs = {}, retcode = 2
- cmd = ['borgmatic', '-v', '2', '--config', '/tmp/tmpqrru9c3w/test.yaml', '--init', ...]
- def check_call(*popenargs, **kwargs):
- """Run command with arguments. Wait for command to complete. If
- the exit code was zero then return, otherwise raise
- CalledProcessError. The CalledProcessError object will have the
- return code in the returncode attribute.
- The arguments are the same as for the call function. Example:
- check_call(["ls", "-l"])
- """
- retcode = call(*popenargs, **kwargs)
- if retcode:
- cmd = kwargs.get("args")
- if cmd is None:
- cmd = popenargs[0]
- > raise CalledProcessError(retcode, cmd)
- E subprocess.CalledProcessError: Command '['borgmatic', '-v', '2', '--config', '/tmp/tmpqrru9c3w/test.yaml', '--init', '--encryption', 'repokey']' returned non-zero exit status 2.
- /usr/lib/python3.7/subprocess.py:341: CalledProcessError
- ---------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------
- Generated a sample configuration file at /tmp/tmpqrru9c3w/test.yaml.
- Please edit the file to suit your needs. The values are just representative.
- All fields are optional except where indicated.
- ---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
- usage: borgmatic [-h] [-c CONFIG_PATHS [CONFIG_PATHS ...]]
- [--excludes EXCLUDES_FILENAME] [-p] [-C] [-k] [-l] [-i]
- [--json] [-n] [-v {0,1,2}]
- borgmatic: error: unrecognized arguments: --init --encryption repokey
- __________________________________________________________________________________ test_borgmatic_version_matches_news_version ___________________________________________________________________________________
- def test_borgmatic_version_matches_news_version():
- > borgmatic_version = subprocess.check_output(('borgmatic', '--version')).decode('ascii')
- tests/integration/commands/test_borgmatic.py:177:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python3.7/subprocess.py:389: in check_output
- **kwargs).stdout
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- input = None, capture_output = False, timeout = None, check = True, popenargs = (('borgmatic', '--version'),), kwargs = {'stdout': -1}, process = <subprocess.Popen object at 0x7f0891d4d5c0>, stdout = b''
- stderr = None, retcode = 2
- 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.
- 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 'stdin' in kwargs:
- raise ValueError('stdin and input arguments may not both be used.')
- kwargs['stdin'] = PIPE
- if capture_output:
- if ('stdout' in kwargs) or ('stderr' in kwargs):
- 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:
- process.kill()
- stdout, stderr = process.communicate()
- raise TimeoutExpired(process.args, timeout, output=stdout,
- stderr=stderr)
- 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 '('borgmatic', '--version')' returned non-zero exit status 2.
- /usr/lib/python3.7/subprocess.py:481: CalledProcessError
- ---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
- usage: borgmatic [-h] [-c CONFIG_PATHS [CONFIG_PATHS ...]]
- [--excludes EXCLUDES_FILENAME] [-p] [-C] [-k] [-l] [-i]
- [--json] [-n] [-v {0,1,2}]
- borgmatic: error: unrecognized arguments: --version
- ====================================================================================== 2 failed, 217 passed in 1.48 seconds ======================================================================================
- ==> ERROR: A failure occurred in check().
- Aborting...
- 2018-12-29 15:57:18,179 - wrappers - makepkg - ERROR - makepkg query ['makepkg', '-cf', '--noconfirm'] failed in directory /home/evan/Sources/aur/borgmatic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement