-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop 'inflection' and make transitive dependencies versions explicit (#…
…174) * Add version range for the zipp and MarkupSafe dependencies These are not direct dependencies but rather ones from Jinja2 and jsonschema. We need them to be within specific version range as we are required to support Python 3.5 in mozilla-central. * Drop the 'inflection' dependency This implements the to_camel_case function and adds basic test coverage for it. * Update HISTORY.rst
- Loading branch information
Showing
5 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -26,7 +26,6 @@ is installed by `pip`. | |
- appdirs | ||
- Click | ||
- diskcache | ||
- inflection | ||
- Jinja2 | ||
- jsonschema | ||
- PyYAML | ||
|
This file contains 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
This file contains 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
This file contains 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,31 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Any copyright is dedicated to the Public Domain. | ||
# http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
from glean_parser.util import to_camel_case | ||
|
||
|
||
def test_camel_case_first_lowercase(): | ||
assert "testMe" == to_camel_case("test_me", False) | ||
|
||
|
||
def test_camel_case_first_uppercase(): | ||
assert "TestMe" == to_camel_case("test_me", True) | ||
|
||
|
||
def test_camel_case_empty_tokens(): | ||
assert "testMe" == to_camel_case("__test____me", False) | ||
|
||
|
||
def test_camel_case_dots_sanitized(): | ||
assert "testMeYeah" == to_camel_case("__test..me.yeah", False) | ||
|
||
|
||
def test_camel_case_numbers(): | ||
assert "g33kS4n1t1z3d" == to_camel_case("g33k_s4n1t1z3d", False) | ||
|
||
|
||
def test_camel_case_expected(): | ||
assert "easyOne" == to_camel_case("easy_one", False) | ||
assert "moreInvolved1" == to_camel_case("more_involved_1", False) |