Skip to content

Conversation

@swastkk
Copy link
Collaborator

@swastkk swastkk commented Apr 2, 2024

Fixes #3659

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: swastkk <swastkk@gmail.com>
@swastkk
Copy link
Collaborator Author

swastkk commented Apr 2, 2024

After adding the tests

=========================================== FAILURES ===========================================
__________________________ TestTextPreparation.test_invaild_copyright __________________________

self = <test_copyrights_basic.TestTextPreparation testMethod=test_invaild_copyright>

    def test_invaild_copyright(self):
        cp= '[C] The Regents of the University of Michigan'
        result= copyrights.prepare_text_line(cp)
>       assert result == 'Copyright (C) The Regents of the University of Michigan'
E       AssertionError: assert 'C The Regent...y of Michigan' == 'Copyright (C...y of Michigan'
E         - Copyright (C) The Regents of the University of Michigan
E         ?  ------------
E         + Copyright C The Regents of the University of Michigan

test_copyrights_basic.py:37: AssertionError
___________________ TestTextPreparation.test_invaild_copyright_insensitivity ___________________

self = <test_copyrights_basic.TestTextPreparation testMethod=test_invaild_copyright_insensitivity>

    def test_invaild_copyright_insensitivity(self):
        cp= '[c] The Regents of the University of Michigan and Merit Network, Inc. 1992,'
        result= copyrights.prepare_text_line(cp)
        print(result)
>       assert result== '(c) The Regents of the University of Michigan and Merit Network, Inc. 1992,'
E       AssertionError: assert 'c The Regent...k, Inc. 1992,' == '(c) The Rege...k, Inc. 1992,'
E         - (c) The Regents of the University of Michigan and Merit Network, Inc. 1992,
E         ? - -
E         + c The Regents of the University of Michigan and Merit Network, Inc. 1992,

test_copyrights_basic.py:43: AssertionError
------------------------------------- Captured stdout call -------------------------------------
c The Regents of the University of Michigan and Merit Network, Inc. 1992,
=================================== short test summary info ====================================
FAILED test_copyrights_basic.py::TestTextPreparation::test_invaild_copyright - AssertionError...
FAILED test_copyrights_basic.py::TestTextPreparation::test_invaild_copyright_insensitivity - ...
================================= 2 failed, 52 passed in 2.46s =================================

Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nit pickings to fix and then next step will be to fix this proper.

Signed-off-by: swastkk <swastkk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid copyright not detected

2 participants