mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Merge pull request #116 from ch-nickgustafson/fix-oauth-and-sort-bugs
Fix oauth and sort bugs
This commit is contained in:
commit
f0b8593809
@ -800,7 +800,7 @@ nester:abofly
|
|||||||
nester:bssm_pythonSig
|
nester:bssm_pythonSig
|
||||||
novaclient:python_novaclient
|
novaclient:python_novaclient
|
||||||
oauth2_provider:alauda_django_oauth
|
oauth2_provider:alauda_django_oauth
|
||||||
oauth2client:google_api_python_client
|
oauth2client:oauth2client
|
||||||
odf:odfpy
|
odf:odfpy
|
||||||
ometa:Parsley
|
ometa:Parsley
|
||||||
openid:python_openid
|
openid:python_openid
|
||||||
|
@ -267,7 +267,7 @@ def get_pkg_names(pkgs):
|
|||||||
# simply use the package name.
|
# simply use the package name.
|
||||||
result.add(data.get(pkg, pkg))
|
result.add(data.get(pkg, pkg))
|
||||||
# Return a sorted list for backward compatibility.
|
# Return a sorted list for backward compatibility.
|
||||||
return sorted(result)
|
return sorted(result, key=lambda s: s.lower())
|
||||||
|
|
||||||
|
|
||||||
def get_name_without_alias(name):
|
def get_name_without_alias(name):
|
||||||
|
@ -69,6 +69,12 @@ class TestPipreqs(unittest.TestCase):
|
|||||||
item['name'].lower() in self.modules,
|
item['name'].lower() in self.modules,
|
||||||
"Import item appears to be missing " + item['name'])
|
"Import item appears to be missing " + item['name'])
|
||||||
|
|
||||||
|
def test_get_pkg_names(self):
|
||||||
|
pkgs = ['jury', 'Japan', 'camel', 'Caroline']
|
||||||
|
actual_output = pipreqs.get_pkg_names(pkgs)
|
||||||
|
expected_output = ['camel', 'Caroline', 'Japan', 'jury']
|
||||||
|
self.assertEqual(actual_output, expected_output)
|
||||||
|
|
||||||
def test_get_use_local_only(self):
|
def test_get_use_local_only(self):
|
||||||
"""
|
"""
|
||||||
Test without checking PyPI, check to see if names of local imports matches what we expect
|
Test without checking PyPI, check to see if names of local imports matches what we expect
|
||||||
|
Loading…
x
Reference in New Issue
Block a user