diff options
Diffstat (limited to 'tests/python')
35 files changed, 2 insertions, 87 deletions
diff --git a/tests/python/alembic_export_tests.py b/tests/python/alembic_export_tests.py index f6c05d955c9..95ae3ee9feb 100644 --- a/tests/python/alembic_export_tests.py +++ b/tests/python/alembic_export_tests.py @@ -1,8 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - """ Alembic Export Tests diff --git a/tests/python/batch_import.py b/tests/python/batch_import.py index a6b44bc7478..811b070b0ca 100644 --- a/tests/python/batch_import.py +++ b/tests/python/batch_import.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - """ Example Usage: diff --git a/tests/python/bl_alembic_io_test.py b/tests/python/bl_alembic_io_test.py index f3480380911..4cfda239bd1 100644 --- a/tests/python/bl_alembic_io_test.py +++ b/tests/python/bl_alembic_io_test.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - """ ./blender.bin --background -noaudio --factory-startup --python tests/python/bl_alembic_io_test.py -- --testdir /path/to/lib/tests/alembic """ diff --git a/tests/python/bl_animation_fcurves.py b/tests/python/bl_animation_fcurves.py index 449f17ebfec..931db3f2d22 100644 --- a/tests/python/bl_animation_fcurves.py +++ b/tests/python/bl_animation_fcurves.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - """ blender -b -noaudio --factory-startup --python tests/python/bl_animation_fcurves.py -- --testdir /path/to/lib/tests/animation """ diff --git a/tests/python/bl_bundled_modules.py b/tests/python/bl_bundled_modules.py index 4a055960f83..7728a2deb47 100644 --- a/tests/python/bl_bundled_modules.py +++ b/tests/python/bl_bundled_modules.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # Test that modules we ship with our Python installation are available import bz2 diff --git a/tests/python/bl_keymap_completeness.py b/tests/python/bl_keymap_completeness.py index ee24a531f53..97335a94c01 100644 --- a/tests/python/bl_keymap_completeness.py +++ b/tests/python/bl_keymap_completeness.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # simple script to test 'bl_keymap_utils.keymap_hierarchy' contains correct values. # Needed for 'bl_keymap_utils.keymap_hierarchy' which inspects tools. diff --git a/tests/python/bl_keymap_validate.py b/tests/python/bl_keymap_validate.py index b87eed0c0df..83d41c8a9f6 100644 --- a/tests/python/bl_keymap_validate.py +++ b/tests/python/bl_keymap_validate.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # ./blender.bin --background -noaudio --factory-startup --python tests/python/bl_keymap_validate.py # diff --git a/tests/python/bl_load_addons.py b/tests/python/bl_load_addons.py index 8fee31f7a2b..b94c56541af 100644 --- a/tests/python/bl_load_addons.py +++ b/tests/python/bl_load_addons.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # simple script to enable all addons, and disable """ diff --git a/tests/python/bl_load_py_modules.py b/tests/python/bl_load_py_modules.py index 4d4196d1f64..7ad5895ce86 100644 --- a/tests/python/bl_load_py_modules.py +++ b/tests/python/bl_load_py_modules.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # simple script to enable all addons, and disable """ diff --git a/tests/python/bl_mesh_modifiers.py b/tests/python/bl_mesh_modifiers.py index 3b653402083..640cf1c30f2 100644 --- a/tests/python/bl_mesh_modifiers.py +++ b/tests/python/bl_mesh_modifiers.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # Currently this script only generates images from different modifier # combinations and does not validate they work correctly, # this is because we don't get 1:1 match with bmesh. diff --git a/tests/python/bl_mesh_validate.py b/tests/python/bl_mesh_validate.py index 9a9384ce777..9e093608406 100644 --- a/tests/python/bl_mesh_validate.py +++ b/tests/python/bl_mesh_validate.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # Simple script to check mash validate code. # XXX Should be extended with many more "wrong cases"! diff --git a/tests/python/bl_rigging_symmetrize.py b/tests/python/bl_rigging_symmetrize.py index 6531b4df85f..963be6d41d3 100644 --- a/tests/python/bl_rigging_symmetrize.py +++ b/tests/python/bl_rigging_symmetrize.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - """ blender -b -noaudio --factory-startup --python tests/python/bl_rigging_symmetrize.py -- --testdir /path/to/lib/tests/animation """ diff --git a/tests/python/bl_rna_manual_reference.py b/tests/python/bl_rna_manual_reference.py index 70f218f0bb2..257c8b7601a 100644 --- a/tests/python/bl_rna_manual_reference.py +++ b/tests/python/bl_rna_manual_reference.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # Use for validating our manual interlinking. # ./blender.bin --background -noaudio --python tests/python/bl_rna_manual_reference.py # diff --git a/tests/python/bl_rst_completeness.py b/tests/python/bl_rst_completeness.py index 59e532c433b..4846e65b78f 100644 --- a/tests/python/bl_rst_completeness.py +++ b/tests/python/bl_rst_completeness.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # run this script in the game engine. # or on the command line with... # ./blender.bin --background -noaudio --python tests/python/bl_rst_completeness.py diff --git a/tests/python/bl_run_operators.py b/tests/python/bl_run_operators.py index 7e73ec163a4..a2478bd7547 100644 --- a/tests/python/bl_run_operators.py +++ b/tests/python/bl_run_operators.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # semi-useful script, runs all operators in a number of different # contexts, cheap way to find misc small bugs but is in no way a complete test. # diff --git a/tests/python/bl_run_operators_event_simulate.py b/tests/python/bl_run_operators_event_simulate.py index 56f96847d0b..d218e6b1bc0 100644 --- a/tests/python/bl_run_operators_event_simulate.py +++ b/tests/python/bl_run_operators_event_simulate.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - r""" Overview ======== diff --git a/tests/python/bl_test.py b/tests/python/bl_test.py index 7e79639a226..b71ebd2a7a7 100644 --- a/tests/python/bl_test.py +++ b/tests/python/bl_test.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import sys import os diff --git a/tests/python/bl_usd_import_test.py b/tests/python/bl_usd_import_test.py index 1ba9b4f1edf..95b2328b2aa 100644 --- a/tests/python/bl_usd_import_test.py +++ b/tests/python/bl_usd_import_test.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import pathlib import sys import unittest diff --git a/tests/python/boolean_operator.py b/tests/python/boolean_operator.py index fed0b2bddfd..8b93226ab93 100644 --- a/tests/python/boolean_operator.py +++ b/tests/python/boolean_operator.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # To run all tests, use # BLENDER_VERBOSE=1 blender path/to/bool_regression.blend --python path/to/boolean_operator.py -- --run-all-tests # To run one test, use diff --git a/tests/python/deform_modifiers.py b/tests/python/deform_modifiers.py index 40cd9d4839c..e5be133a3ef 100644 --- a/tests/python/deform_modifiers.py +++ b/tests/python/deform_modifiers.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # To run the test type: blender -b /path/to/the/blend/file --python path/to/this/py/file -- --run-all-tests -- --verbose # Type the above line in cmd/terminal, for example, look below # blender -b c:\blender-lib\deform_modifiers.blend --python c:\deform_modifiers.py -- --run-all-tests -- --verbose diff --git a/tests/python/ffmpeg_tests.py b/tests/python/ffmpeg_tests.py index abbe38193b5..b40b8030f7e 100644 --- a/tests/python/ffmpeg_tests.py +++ b/tests/python/ffmpeg_tests.py @@ -1,8 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import argparse import pathlib import sys diff --git a/tests/python/geo_node_test.py b/tests/python/geo_node_test.py index 9d7c634db76..0842dd001da 100644 --- a/tests/python/geo_node_test.py +++ b/tests/python/geo_node_test.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import os import sys diff --git a/tests/python/modifiers.py b/tests/python/modifiers.py index 8f8b5c6498c..827cc80393a 100644 --- a/tests/python/modifiers.py +++ b/tests/python/modifiers.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import math import os import sys diff --git a/tests/python/modules/mesh_test.py b/tests/python/modules/mesh_test.py index 873ab779d65..5b01bfeee94 100644 --- a/tests/python/modules/mesh_test.py +++ b/tests/python/modules/mesh_test.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # A framework to run regression tests on mesh modifiers and operators based on howardt's mesh_ops_test.py # # General idea: diff --git a/tests/python/modules/test_utils.py b/tests/python/modules/test_utils.py index d5cd743cde9..6aba3a75263 100755 --- a/tests/python/modules/test_utils.py +++ b/tests/python/modules/test_utils.py @@ -1,8 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import functools import shutil import pathlib diff --git a/tests/python/operators.py b/tests/python/operators.py index 6ccc96dba5d..548a2b50b05 100644 --- a/tests/python/operators.py +++ b/tests/python/operators.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import bpy import os import sys diff --git a/tests/python/pep8.py b/tests/python/pep8.py index 9a2871c9ed5..2583bec8256 100644 --- a/tests/python/pep8.py +++ b/tests/python/pep8.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8-80 compliant> - import os import subprocess import shutil @@ -22,7 +20,6 @@ import shutil # how many lines to read into the file, pep8 comment # should be directly after the license header, ~20 in most cases -PEP8_SEEK_COMMENT = 40 SKIP_PREFIX = "./tools", "./config", "./extern" SKIP_ADDONS = True FORCE_PEP8_ALL = False @@ -39,22 +36,8 @@ def is_pep8(path): print(path) if open(path, 'rb').read(3) == b'\xef\xbb\xbf': print("\nfile contains BOM, remove first 3 bytes: %r\n" % path) - - # templates don't have a header but should be pep8 - for d in ("presets", "templates_py", "examples"): - if ("%s%s%s" % (os.sep, d, os.sep)) in path: - return 1 - - f = open(path, 'r', encoding="utf8") - for _ in range(PEP8_SEEK_COMMENT): - line = f.readline() - if line.startswith("# <pep8"): - if line.startswith("# <pep8 compliant>"): - return 1 - elif line.startswith("# <pep8-80 compliant>"): - return 2 - f.close() - return 0 + # Currently all scripts assumed to be pep8. + return 1 def check_files_flake8(files): diff --git a/tests/python/physics_cloth.py b/tests/python/physics_cloth.py index e453b4dd68b..fbd33392371 100644 --- a/tests/python/physics_cloth.py +++ b/tests/python/physics_cloth.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import os import sys diff --git a/tests/python/physics_dynamic_paint.py b/tests/python/physics_dynamic_paint.py index 57b96ccffba..132c7b8c46d 100644 --- a/tests/python/physics_dynamic_paint.py +++ b/tests/python/physics_dynamic_paint.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import os import sys diff --git a/tests/python/physics_ocean.py b/tests/python/physics_ocean.py index 20d563f782b..54cf8d65a9d 100644 --- a/tests/python/physics_ocean.py +++ b/tests/python/physics_ocean.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import os import sys diff --git a/tests/python/physics_particle_instance.py b/tests/python/physics_particle_instance.py index 353c0d868c8..3cd52fd9fa0 100644 --- a/tests/python/physics_particle_instance.py +++ b/tests/python/physics_particle_instance.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import os import sys diff --git a/tests/python/physics_particle_system.py b/tests/python/physics_particle_system.py index 37e3df781b0..51afae68a7b 100644 --- a/tests/python/physics_particle_system.py +++ b/tests/python/physics_particle_system.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import os import sys import bpy diff --git a/tests/python/physics_softbody.py b/tests/python/physics_softbody.py index 00d2a637cf7..ebb9fbb724f 100644 --- a/tests/python/physics_softbody.py +++ b/tests/python/physics_softbody.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - import os import sys diff --git a/tests/python/rna_info_dump.py b/tests/python/rna_info_dump.py index afedf670f2f..af00ef54de9 100644 --- a/tests/python/rna_info_dump.py +++ b/tests/python/rna_info_dump.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # Used for generating API diffs between releases # ./blender.bin --background -noaudio --python tests/python/rna_info_dump.py diff --git a/tests/python/rst_to_doctree_mini.py b/tests/python/rst_to_doctree_mini.py index 3466c915aa0..43116922fe5 100644 --- a/tests/python/rst_to_doctree_mini.py +++ b/tests/python/rst_to_doctree_mini.py @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# <pep8 compliant> - # Module with function to extract a doctree from an reStructuredText file. # Named 'Mini' because we only parse the minimum data needed to check # Python classes, methods and attributes match up to those in existing modules. |