FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab-submodule/tests/test_string_utils.py at main · ValentinFrancois/python-gitlab-submodule · GitHub
ValentinFrancois
/
python-gitlab-submodule
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
3
Code
Issues
1
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab-submodule
/
tests
/
test_string_utils.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (21 loc) · 1006 Bytes
Breadcrumbs
python-gitlab-submodule
/
tests
/
test_string_utils.py
Copy path
File metadata and controls
32 lines (21 loc) · 1006 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import
unittest
from
gitlab_submodule
.
string_utils
import
lstrip
,
rstrip
class
TestObjects
(
unittest
.
TestCase
):
def
test_lstrip_pattern_present
(
self
):
self
.
assertEqual
(
lstrip
(
'FOObar'
,
'FOO'
),
'bar'
)
def
test_lstrip_pattern_empty
(
self
):
self
.
assertEqual
(
lstrip
(
'FOObar'
,
''
),
'FOObar'
)
def
test_lstrip_pattern_absent
(
self
):
self
.
assertEqual
(
lstrip
(
'bar'
,
'FOO'
),
'bar'
)
self
.
assertEqual
(
lstrip
(
'foobar'
,
'FOO'
),
'foobar'
)
def
test_lstrip_string_empty
(
self
):
self
.
assertEqual
(
lstrip
(
''
,
'foo'
),
''
)
def
test_rstrip_pattern_present
(
self
):
self
.
assertEqual
(
rstrip
(
'fooBAR'
,
'BAR'
),
'foo'
)
def
test_rstrip_pattern_empty
(
self
):
self
.
assertEqual
(
rstrip
(
'fooBAR'
,
''
),
'fooBAR'
)
def
test_rstrip_pattern_absent
(
self
):
self
.
assertEqual
(
rstrip
(
'foo'
,
'BAR'
),
'foo'
)
self
.
assertEqual
(
rstrip
(
'foobar'
,
'BAR'
),
'foobar'
)
def
test_rstrip_string_empty
(
self
):
self
.
assertEqual
(
rstrip
(
''
,
'foo'
),
''
)
Back
|
FazBrowse Home
|
New Git URL