Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_format_rst_without_filter fails with wcwidth>=0.2.10 #178

Closed
danigm opened this issue Jan 18, 2024 · 2 comments · Fixed by #179
Closed

test_format_rst_without_filter fails with wcwidth>=0.2.10 #178

danigm opened this issue Jan 18, 2024 · 2 comments · Fixed by #179

Comments

@danigm
Copy link

danigm commented Jan 18, 2024

With a modern version of wcwidth this test fail. Looks like docutils is not raising any error anymore.

______________________________________________ TestGetLicenses.test_format_rst_without_filter ______________________________________________

self = <test_piplicenses.TestGetLicenses testMethod=test_format_rst_without_filter>

    @unittest.skipIf(
        sys.version_info < (3, 6, 0),
        "To unsupport Python 3.5 in the near future",
    )
    def test_format_rst_without_filter(self) -> None:
        piplicenses.importlib_metadata.distributions = (
            importlib_metadata_distributions_mocked
        )
        format_rst_args = ["--format=rst"]
        args = self.parser.parse_args(format_rst_args)
        table = create_licenses_table(args)
    
        self.assertIn("l", table.align.values())
        self.assertTrue(table.border)
        self.assertTrue(table.header)
        self.assertEqual("+", table.junction_char)
        self.assertEqual(RULE_ALL, table.hrules)
>       with self.assertRaises(docutils.utils.SystemMessage):
E       AssertionError: SystemMessage not raised

test_piplicenses.py:579: AssertionError
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Jan 18, 2024
https://build.opensuse.org/request/show/1139702
by user dgarcia + anag+factory
- Update to version 4.3.3:
  * Always terminate --allow-only and --fail-on messages with a newline
  * Always terminate files created with --output-file with a newline
- Ignore broken test with latest version of wcwidth,
  gh#raimon49/pip-licenses#178
@raimon49
Copy link
Owner

@danigm Thanks for the very detailed report.

I will attempt to delete the broken test case.

@raimon49
Copy link
Owner

@danigm This problem was fixed in the master branch.

Also, since you seem to be the maintainer of the OS package, I have shipped v4.3.4 of pip-licenses as a release tag.

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Jan 23, 2024
https://build.opensuse.org/request/show/1140772
by user dgarcia + anag+factory
- Remove not needed test ignore, fixed upstream.
- update to 4.3.4:
  * Maintain to pass test with wcwidth>=0.2.10
- Update to version 4.3.3:
  * Always terminate --allow-only and --fail-on messages with a newline
  * Always terminate files created with --output-file with a newline
- Ignore broken test with latest version of wcwidth,
  gh#raimon49/pip-licenses#178
- update to 4.3.2:
  * Better Handling extracting URLs from `Project-URL`
- Update to 4.3.1:
  * Fix to treat package names as normalized as in PEP 503 with
    --packages and --ignore-packages option
- 4.3.0:
  * Implement new option --no-version
- Update to 4.2.0:
  - Implement new option --with-maintainers
  - Implement new option --python
  - Allow version spec in --ignore-packages parameters
  - When the Author field is UNKNO
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Feb 7, 2024
https://build.opensuse.org/request/show/1139702
by user dgarcia + anag+factory
- Update to version 4.3.3:
  * Always terminate --allow-only and --fail-on messages with a newline
  * Always terminate files created with --output-file with a newline
- Ignore broken test with latest version of wcwidth,
  gh#raimon49/pip-licenses#178
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Feb 7, 2024
https://build.opensuse.org/request/show/1140772
by user dgarcia + anag+factory
- Remove not needed test ignore, fixed upstream.
- update to 4.3.4:
  * Maintain to pass test with wcwidth>=0.2.10
- Update to version 4.3.3:
  * Always terminate --allow-only and --fail-on messages with a newline
  * Always terminate files created with --output-file with a newline
- Ignore broken test with latest version of wcwidth,
  gh#raimon49/pip-licenses#178
- update to 4.3.2:
  * Better Handling extracting URLs from `Project-URL`
- Update to 4.3.1:
  * Fix to treat package names as normalized as in PEP 503 with
    --packages and --ignore-packages option
- 4.3.0:
  * Implement new option --no-version
- Update to 4.2.0:
  - Implement new option --with-maintainers
  - Implement new option --python
  - Allow version spec in --ignore-packages parameters
  - When the Author field is UNKNO
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Feb 7, 2024
https://build.opensuse.org/request/show/1139702
by user dgarcia + anag+factory
- Update to version 4.3.3:
  * Always terminate --allow-only and --fail-on messages with a newline
  * Always terminate files created with --output-file with a newline
- Ignore broken test with latest version of wcwidth,
  gh#raimon49/pip-licenses#178
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Feb 7, 2024
https://build.opensuse.org/request/show/1140772
by user dgarcia + anag+factory
- Remove not needed test ignore, fixed upstream.
- update to 4.3.4:
  * Maintain to pass test with wcwidth>=0.2.10
- Update to version 4.3.3:
  * Always terminate --allow-only and --fail-on messages with a newline
  * Always terminate files created with --output-file with a newline
- Ignore broken test with latest version of wcwidth,
  gh#raimon49/pip-licenses#178
- update to 4.3.2:
  * Better Handling extracting URLs from `Project-URL`
- Update to 4.3.1:
  * Fix to treat package names as normalized as in PEP 503 with
    --packages and --ignore-packages option
- 4.3.0:
  * Implement new option --no-version
- Update to 4.2.0:
  - Implement new option --with-maintainers
  - Implement new option --python
  - Allow version spec in --ignore-packages parameters
  - When the Author field is UNKNO
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 a pull request may close this issue.

2 participants