Skip to content

Commit a27fb3a

Browse files
committed
Add pycodestyle tests to default tests
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 9c0f05e commit a27fb3a

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright (c) 2017 nexB Inc. and others. All rights reserved.
2+
# http://nexb.com and https://github.com/nexB/vulnerablecode/
3+
# The VulnerableCode software is licensed under the Apache License version 2.0.
4+
# Data generated with VulnerableCode require an acknowledgment.
5+
#
6+
# You may not use this software except in compliance with the License.
7+
# You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software distributed
9+
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10+
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
# When you publish or redistribute any data created with VulnerableCode or any VulnerableCode
14+
# derivative work, you must accompany this data with the following acknowledgment:
15+
#
16+
# Generated with VulnerableCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
17+
# OR CONDITIONS OF ANY KIND, either express or implied. No content created from
18+
# VulnerableCode should be considered or used as legal advice. Consult an Attorney
19+
# for any legal advice.
20+
# VulnerableCode is a free software code scanning tool from nexB Inc. and others.
21+
# Visit https://github.com/nexB/vulnerablecode/ for support and download.
22+
23+
from os.path import dirname
24+
from os.path import join
25+
import subprocess
26+
import sys
27+
import unittest
28+
29+
30+
root_dir = dirname(dirname(dirname(__file__)))
31+
bin_dir = dirname(sys.executable)
32+
33+
34+
class BaseTests(unittest.TestCase):
35+
36+
def test_codestyle(self):
37+
subprocess.check_output(
38+
(
39+
join(bin_dir, "pycodestyle") +
40+
" --exclude=migrations,settings.py,venv,lib_oval.py,test_ubuntu.py,"
41+
"test_suse.py,test_data_source.py "
42+
"--max-line-length=100 "
43+
"vulnerablecode vulnerabilities"
44+
).split(), cwd=root_dir)

0 commit comments

Comments
 (0)