-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
python312Packages.unicode-slugify: drop nose dependency #329998
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
pkgs/development/python-modules/unicode-slugify/use_pytest_instead_of_nose.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| diff --git a/slugify/tests.py b/slugify/tests.py | ||
| index 9f636c4..5562e87 100644 | ||
| --- a/slugify/tests.py | ||
| +++ b/slugify/tests.py | ||
| @@ -3,7 +3,7 @@ from __future__ import unicode_literals | ||
|
|
||
| import six | ||
| import unittest | ||
| -from nose.tools import eq_, raises | ||
| +import pytest | ||
|
|
||
| from slugify import slugify, smart_text, SLUG_OK | ||
|
|
||
| @@ -13,31 +13,31 @@ def test_slugify(): | ||
| x = '-'.join([u, u]) | ||
| y = ' - '.join([u, u]) | ||
|
|
||
| - @raises(ValueError) | ||
| def test_incoherent_ok_and_only_ascii_raises_an_error(): | ||
| """Checks that only_ascii=True with non ascii "ok" chars actually raises an error.""" | ||
| - slugify('angry smiley !', ok='è_é', only_ascii=True) | ||
| + with pytest.raises(ValueError): | ||
| + slugify('angry smiley !', ok='è_é', only_ascii=True) | ||
|
|
||
| def check(x, y): | ||
| - eq_(slugify(x), y) | ||
| + assert slugify(x) == y | ||
|
|
||
| def check_only_ascii(x, y): | ||
| - eq_(slugify(x, only_ascii=True), y) | ||
| + assert slugify(x, only_ascii=True) == y | ||
|
|
||
| def check_only_ascii_capital(x, y): | ||
| - eq_(slugify(x, lower=False, only_ascii=True), y) | ||
| + assert slugify(x, lower=False, only_ascii=True) == y | ||
|
|
||
| def check_only_ascii_lower_nospaces(x, y): | ||
| - eq_(slugify(x, lower=True, spaces=False, only_ascii=True), y) | ||
| + assert slugify(x, lower=True, spaces=False, only_ascii=True) == y | ||
|
|
||
| def check_ok_chars(x, y): | ||
| - eq_(slugify(x, ok='-♰é_è'), y) | ||
| + assert slugify(x, ok='-♰é_è') == y | ||
|
|
||
| def check_empty_ok_chars(x, y): | ||
| - eq_(slugify(x, ok=''), y) | ||
| + assert slugify(x, ok='') == y | ||
|
|
||
| def check_limited_ok_chars_only_ascii(x, y): | ||
| - eq_(slugify(x, ok='-', only_ascii=True), y) | ||
| + assert slugify(x, ok='-', only_ascii=True) == y | ||
|
|
||
| s = [('xx x - "#$@ x', 'xx-x-x'), | ||
| ('Bän...g (bang)', 'bäng-bang'), | ||
| @@ -112,11 +112,11 @@ def test_slugify(): | ||
|
|
||
| #Test custom space replacement | ||
| x, y = ('-☀- pretty waves under the sunset 😎', '--~pretty~waves~under~the~sunset') | ||
| - eq_(slugify(x, space_replacement='~'), y) | ||
| + assert slugify(x, space_replacement='~') == y | ||
|
|
||
| #Test default auto space replacement | ||
| x, y = ('-☀- pretty waves under the sunset 😎', 'pretty~waves~under~the~sunset') | ||
| - eq_(slugify(x, ok='~'), y) | ||
| + assert slugify(x, ok='~') == y | ||
|
|
||
|
|
||
| class SmartTextTestCase(unittest.TestCase): | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.