Ubuntu Pastebin

Paste from mwhudson at Mon, 24 Jul 2017 11:15:28 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
=================================== FAILURES ===================================
_________________ test_with_compare_details_and_tool_not_found _________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f71dc22b400>

    @skip_unless_tools_exist('xxd')
    def test_with_compare_details_and_tool_not_found(monkeypatch):
        from diffoscope.external_tools import EXTERNAL_TOOLS
        monkeypatch.setitem(
            EXTERNAL_TOOLS,
            'nonexistent',
            {
                'debian': 'some-package',
                'arch': 'some-package',
                'Fedora': 'some-package',
                'FreeBSD': 'some-package'
            }
        )
        class MockFile(FilesystemFile):
            @tool_required('nonexistent')
            def compare_details(self, other, source=None):
                raise Exception('should not be run')
        difference = MockFile(TEST_FILE1_PATH).compare(MockFile(TEST_FILE2_PATH))
        expected_diff = get_data('binary_expected_diff')
        assert 'nonexistent' in difference.comment
>       assert 'some-package' in difference.comment
E       assert 'some-package' in "'nonexistent' not available in path. Falling back to binary comparison."
E        +  where "'nonexistent' not available in path. Falling back to binary comparison." = <Difference /<<PKGBUILDDIR>>/.pybuild/pythonX.Y_3.5/build/tests/data/binary1 -- /<<PKGBUILDDIR>>/.pybuild/pythonX.Y_3.5/build/tests/data/binary2 []>.comment

EXTERNAL_TOOLS = {'Rscript': {'arch': 'r', 'debian': 'r-base-core'}, 'apktool': {'debian': 'apktool'}, 'bsdtar': {'Fedora': 'bsdtar', '... 'libarchive', 'arch': 'libarchive', 'debian': 'libarchive-tools'}, 'bzip2': {'arch': 'bzip2', 'debian': 'bzip2'}, ...}
MockFile   = <class 'tests.comparators.test_binary.test_with_compare_details_and_tool_not_found.<locals>.MockFile'>
difference = <Difference /<<PKGBUILDDIR>>/.pybuild/pythonX.Y_3.5/build/tests/data/binary1 -- /<<PKGBUILDDIR>>/.pybuild/pythonX.Y_3.5/build/tests/data/binary2 []>
expected_diff = '@@ -1 +1 @@\n-00000000: c633 e589 d7d7 ed19 228e d7d3 e325 2309  .3......"....%#.\n+00000000: cfa9 41f6 baf2 e1f3 65af 9f01 cf2f f2f5  ..A.....e..../..\n'
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f71dc22b400>

tests/comparators/test_binary.py:181: AssertionError
============== 1 failed, 340 passed, 15 skipped in 145.89 seconds ==============
Download as text