# See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # from os.path import abspath from os.path import join from os.path import dirname import unittest import pytest from licensedcode_test_utils import build_tests # NOQA from scancode_config import REGEN_TEST_FIXTURES pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files. Test functions are attached to test classes at module import time """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestLicenseDataDriven2(unittest.TestCase): pass build_tests(join(TEST_DIR, 'datadriven/lic2'), clazz=TestLicenseDataDriven2, regen=REGEN_TEST_FIXTURES)
# See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # from os.path import abspath from os.path import join from os.path import dirname import unittest import pytest from licensedcode_test_utils import build_tests # NOQA pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files. Test functions are attached to test classes at module import time """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestLicenseDataDriven4(unittest.TestCase): pass build_tests( join(TEST_DIR, 'datadriven/lic4'), clazz=TestLicenseDataDriven4, regen=False)
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # from os.path import abspath from os.path import join from os.path import dirname import unittest import pytest from licensedcode_test_utils import build_tests # NOQA pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files. Test functions are attached to test classes at module import time """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestDataDrivenExternal(unittest.TestCase): pass build_tests(join(TEST_DIR, 'datadriven/external'), clazz=TestDataDrivenExternal, regen=False)
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from os.path import abspath from os.path import join from os.path import dirname import unittest import pytest from licensedcode_test_utils import build_tests # NOQA pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files. Test functions are attached to test classes at module import time """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestLicenseDataDriven(unittest.TestCase): pass build_tests(join(TEST_DIR, 'licenses'), clazz=TestLicenseDataDriven, regen=False)
# See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # from os.path import abspath from os.path import join from os.path import dirname import unittest import pytest from licensedcode_test_utils import build_tests # NOQA from scancode_config import REGEN_TEST_FIXTURES pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files. Test functions are attached to test classes at module import time """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestDataDrivenExternal(unittest.TestCase): pass build_tests(join(TEST_DIR, 'datadriven/external'), clazz=TestDataDrivenExternal, regen=REGEN_TEST_FIXTURES)
# from os.path import abspath from os.path import join from os.path import dirname import unittest import pytest from licensedcode_test_utils import build_tests # NOQA pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files for unknown license. Test functions are attached to test classes at module import time. """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestLicenseDataDrivenUnknown(unittest.TestCase): pass build_tests( join(TEST_DIR, 'datadriven/unknown'), clazz=TestLicenseDataDrivenUnknown, unknown_detection=True, regen=False, )
pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files. Test functions are attached to test classes at module import time """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestLicenseRetrographyDataDriven(unittest.TestCase): pass build_tests( join(TEST_DIR, 'retro_licenses/OS-Licenses-master'), clazz=TestLicenseRetrographyDataDriven, regen=False) class TestLicenseSpdxDataDriven(unittest.TestCase): pass build_tests( join(TEST_DIR, 'spdx/licenses'), clazz=TestLicenseSpdxDataDriven, regen=False) class TestLicenseToolsDataDriven(unittest.TestCase): # this is for license-related npm tools with a lot of license references in # code, tests and data pass
from os.path import abspath from os.path import join from os.path import dirname import unittest import pytest from licensedcode_test_utils import build_tests # NOQA from scancode_config import REGEN_TEST_FIXTURES pytestmark = pytest.mark.scanslow """ Data-driven tests using expectations stored in YAML files for unknown license. Test functions are attached to test classes at module import time. """ TEST_DIR = abspath(join(dirname(__file__), 'data')) class TestLicenseDataDrivenUnknown(unittest.TestCase): pass build_tests( join(TEST_DIR, 'datadriven/unknown'), clazz=TestLicenseDataDrivenUnknown, unknown_detection=True, regen=REGEN_TEST_FIXTURES, )