Skip to content

Commit

Permalink
Add pycodestyle tests to default tests
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Nov 17, 2020
1 parent 9c0f05e commit a27fb3a
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions vulnerabilities/tests/test_basics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2017 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/vulnerablecode/
# The VulnerableCode software is licensed under the Apache License version 2.0.
# Data generated with VulnerableCode require an acknowledgment.
#
# You may not use this software except in compliance with the License.
# You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
#
# When you publish or redistribute any data created with VulnerableCode or any VulnerableCode
# derivative work, you must accompany this data with the following acknowledgment:
#
# Generated with VulnerableCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
# OR CONDITIONS OF ANY KIND, either express or implied. No content created from
# VulnerableCode should be considered or used as legal advice. Consult an Attorney
# for any legal advice.
# VulnerableCode is a free software code scanning tool from nexB Inc. and others.
# Visit https://github.com/nexB/vulnerablecode/ for support and download.

from os.path import dirname
from os.path import join
import subprocess
import sys
import unittest


root_dir = dirname(dirname(dirname(__file__)))
bin_dir = dirname(sys.executable)


class BaseTests(unittest.TestCase):

def test_codestyle(self):
subprocess.check_output(
(
join(bin_dir, "pycodestyle") +
" --exclude=migrations,settings.py,venv,lib_oval.py,test_ubuntu.py,"
"test_suse.py,test_data_source.py "
"--max-line-length=100 "
"vulnerablecode vulnerabilities"
).split(), cwd=root_dir)

0 comments on commit a27fb3a

Please sign in to comment.