Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
package_control_channel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
package_control_channel
Commits
e130c04c
Commit
e130c04c
authored
Apr 29, 2015
by
FichteFoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for indentation in channel.json
First indicated by #4378.
parent
51dcfd52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
test.py
tests/test.py
+5
-2
No files found.
tests/test.py
View file @
e130c04c
...
@@ -205,7 +205,7 @@ class TestContainer(object):
...
@@ -205,7 +205,7 @@ class TestContainer(object):
self
.
assertEqual
(
packages
,
sorted
(
packages
,
key
=
str_cls
.
lower
),
self
.
assertEqual
(
packages
,
sorted
(
packages
,
key
=
str_cls
.
lower
),
"Packages must be sorted alphabetically (by name)"
)
"Packages must be sorted alphabetically (by name)"
)
def
_test_
repository_indents
(
self
,
includ
e
,
contents
):
def
_test_
indentation
(
self
,
filenam
e
,
contents
):
for
i
,
line
in
enumerate
(
contents
.
splitlines
()):
for
i
,
line
in
enumerate
(
contents
.
splitlines
()):
self
.
assertRegex
(
line
,
r"^\t*\S"
,
self
.
assertRegex
(
line
,
r"^\t*\S"
,
"Indent must be tabs in line
%
d"
%
(
i
+
1
))
"Indent must be tabs in line
%
d"
%
(
i
+
1
))
...
@@ -594,6 +594,9 @@ class DefaultChannelTests(TestContainer, unittest.TestCase):
...
@@ -594,6 +594,9 @@ class DefaultChannelTests(TestContainer, unittest.TestCase):
for
repo
in
self
.
j
[
'repositories'
]:
for
repo
in
self
.
j
[
'repositories'
]:
self
.
assertIsInstance
(
repo
,
str_cls
)
self
.
assertIsInstance
(
repo
,
str_cls
)
def
test_indentation
(
self
):
return
self
.
_test_indentation
(
None
,
self
.
source
)
def
test_channel_repo_order
(
self
):
def
test_channel_repo_order
(
self
):
repos
=
self
.
j
[
'repositories'
]
repos
=
self
.
j
[
'repositories'
]
self
.
assertEqual
(
repos
,
sorted
(
repos
,
key
=
str_cls
.
lower
),
self
.
assertEqual
(
repos
,
sorted
(
repos
,
key
=
str_cls
.
lower
),
...
@@ -653,7 +656,7 @@ class DefaultRepositoryTests(TestContainer, unittest.TestCase):
...
@@ -653,7 +656,7 @@ class DefaultRepositoryTests(TestContainer, unittest.TestCase):
continue
continue
# `include` is for output during tests only
# `include` is for output during tests only
yield
cls
.
_test_
repository_indents
,
(
include
,
contents
)
yield
cls
.
_test_
indentation
,
(
include
,
contents
)
yield
cls
.
_test_repository_keys
,
(
include
,
data
)
yield
cls
.
_test_repository_keys
,
(
include
,
data
)
yield
cls
.
_test_repository_package_order
,
(
include
,
data
)
yield
cls
.
_test_repository_package_order
,
(
include
,
data
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment