Giter Site home page Giter Site logo

[v3.1.0] Test failure about torf-cli HOT 8 CLOSED

rndusr avatar rndusr commented on May 25, 2024
[v3.1.0] Test failure

from torf-cli.

Comments (8)

rndusr avatar rndusr commented on May 25, 2024

from torf-cli.

dbermond avatar dbermond commented on May 25, 2024

Thank you for the reply.

Yes, it consistently fails for me. I could not get any successful run. Also tested on another machine (Arch build server).

from torf-cli.

rndusr avatar rndusr commented on May 25, 2024

from torf-cli.

dbermond avatar dbermond commented on May 25, 2024

Sure. Here is the output:

============================= test session starts ==============================
platform linux -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/torf-cli/src/torf-cli-3.1.0
collecting ... collected 18 items / 17 deselected / 1 selected

tests/test_info.py::test_creation_date FAILED                            [100%]

=================================== FAILURES ===================================
______________________________ test_creation_date ______________________________

capsys = <_pytest.capture.CaptureFixture object at 0x7fb74d8fb9a0>
create_torrent = functools.partial(<function _create_torrent at 0x7fb74d95d940>, local('/tmp/pytest-of-builduser/pytest-0/test_creation_date0'), local('/tmp/pytest-of-builduser/pytest-0/test_creation_date0/My Torrent'))
human_readable = functools.partial(<function human_readable.<locals>._human_readable at 0x7fb74d75ae50>, <_pytest.monkeypatch.MonkeyPatch object at 0x7fb74d8fb6a0>)
clear_ansi = <function clear_ansi.<locals>._clear_ansi at 0x7fb74d75adc0>
regex = <class 'conftest.regex.<locals>._regex'>

    def test_creation_date(capsys, create_torrent, human_readable, clear_ansi, regex):
        date = datetime(2000, 5, 10, 0, 30, 45)
        with create_torrent(creation_date=date) as torrent_file:
            with human_readable(True):
                run(['-i', torrent_file])
                cap = capsys.readouterr()
                assert clear_ansi(cap.out) == regex(r'^\s*Created  2000-05-10 00:30:45$', flags=re.MULTILINE)
    
            with human_readable(False):
                run(['-i', torrent_file])
                cap = capsys.readouterr()
>               assert cap.out == regex(r'^Created\t957911445$', flags=re.MULTILINE)
E               AssertionError: assert ('Name\tMy Torrent\n'\n 'Info Hash\t5351b9e1a1da3e752a39ff22af929a7c47a85d90\n'\n 'Size\t27\n'\n 'Comment\tOriginal Comment\n'\n 'Created\t957929445\n'\n 'Created By\tOriginal Creator\n'\n 'Private\tno\n'\n 'Tracker\thttp://some.tracker\n'\n 'Webseed\thttp://some.webseed\n'\n 'Piece Size\t16384\n'\n 'Piece Count\t1\n'\n 'File Count\t3\n'\n 'Files\tMy Torrent/Anotherthing.iso\tMy Torrent/Something.jpg\tMy '\n 'Torrent/Thirdthing.txt\n'\n 'Magnet\t'\n 'magnet:?xt=urn:btih:5351b9e1a1da3e752a39ff22af929a7c47a85d90&dn=My+Torrent&xl=27&tr=http%3A%2F%2Fsome.tracker&ws=http%3A%2F%2Fsome.webseed\n') == ^Created\t957911445$
E                 +'Name\tMy Torrent\nInfo Hash\t5351b9e1a1da3e752a39ff22af929a7c47a85d90\nSize\t27\nComment\tOriginal Comment\nCreated\t957929445\nCreated By\tOriginal Creator\nPrivate\tno\nTracker\thttp://some.tracker\nWebseed\thttp://some.webseed\nPiece Size\t16384\nPiece Count\t1\nFile Count\t3\nFiles\tMy Torrent/Anotherthing.iso\tMy Torrent/Something.jpg\tMy Torrent/Thirdthing.txt\nMagnet\tmagnet:?xt=urn:btih:5351b9e1a1da3e752a39ff22af929a7c47a85d90&dn=My+Torrent&xl=27&tr=http%3A%2F%2Fsome.tracker&ws=http%3A%2F%2Fsome.webseed\n'
E                 -^Created\t957911445$

/build/torf-cli/src/torf-cli-3.1.0/tests/test_info.py:147: AssertionError
=========================== short test summary info ============================
FAILED tests/test_info.py::test_creation_date - AssertionError: assert ('Name...
======================= 1 failed, 17 deselected in 0.09s =======================

from torf-cli.

rndusr avatar rndusr commented on May 25, 2024

from torf-cli.

dbermond avatar dbermond commented on May 25, 2024

Applying the patch from commit 756370d on top of v3.1.0 fixes this issue for me.

Thank you for fixing this! :)

I'll update the AUR packages.

from torf-cli.

rndusr avatar rndusr commented on May 25, 2024

from torf-cli.

dbermond avatar dbermond commented on May 25, 2024

Yes, I'm maintaining it on the AUR.

Thank you for creating this software. Very nice.

from torf-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.