diff --git a/pyproject.toml b/pyproject.toml index e88576fd5069c..7cfb90034e1f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,8 +27,6 @@ lint.select = [ ] lint.ignore = [ - "ARG002", - "ARG005", "B006", "B011", "B018", @@ -49,8 +47,10 @@ lint.ignore = [ "PLW2901", ] lint.per-file-ignores."emrun.py" = [ "PLE0704" ] -lint.per-file-ignores."tools/ports/*.py" = [ "ARG001" ] +lint.per-file-ignores."tools/ports/*.py" = [ "ARG001", "ARG005" ] lint.per-file-ignores."test/other/ports/*.py" = [ "ARG001" ] +lint.per-file-ignores."test/parallel_testsuite.py" = [ "ARG002" ] +lint.per-file-ignores."test/test_benchmark.py" = [ "ARG002" ] lint.mccabe.max-complexity = 51 # Recommended: 10 lint.pylint.allow-magic-value-types = [ "bytes", diff --git a/test/test_browser.py b/test/test_browser.py index 0e8b2b38113b7..f39beb5fe466b 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -4406,9 +4406,9 @@ def test_webgl_vao_without_automatic_extensions(self): # blitFramebuffer path on WebGL 2.0 (falls back to VAO on Firefox < 67) 'gl2_no_aa': (['-sMAX_WEBGL_VERSION=2', '-DTEST_WEBGL2=1', '-DTEST_ANTIALIAS=0'],), }) - def test_webgl_offscreen_framebuffer_state_restoration(self, args, skip_vao=False): - cmd = args + ['-lGL', '-sOFFSCREEN_FRAMEBUFFER', '-DEXPLICIT_SWAP=1'] - self.btest_exit('webgl_offscreen_framebuffer_swap_with_bad_state.c', args=cmd) + def test_webgl_offscreen_framebuffer_state_restoration(self, args): + base_args = ['-lGL', '-sOFFSCREEN_FRAMEBUFFER', '-DEXPLICIT_SWAP=1'] + self.btest_exit('webgl_offscreen_framebuffer_swap_with_bad_state.c', args=base_args + args) @parameterized({ '': ([],), @@ -5017,7 +5017,7 @@ def test_offset_converter(self, args): self.btest_exit('test_offset_converter.c', args=['-sUSE_OFFSET_CONVERTER', '-gsource-map'] + args) # Tests emscripten_unwind_to_js_event_loop() behavior - def test_emscripten_unwind_to_js_event_loop(self, *args): + def test_emscripten_unwind_to_js_event_loop(self): self.btest_exit('test_emscripten_unwind_to_js_event_loop.c') @requires_wasm2js @@ -5358,7 +5358,7 @@ def test_wasmfs_opfs_errors(self): self.btest(test, args=args, expected='0') @no_firefox('no 4GB support yet') - def test_emmalloc_memgrowth(self, *args): + def test_emmalloc_memgrowth(self): if not self.is_4gb(): self.set_setting('MAXIMUM_MEMORY', '4GB') self.btest_exit('emmalloc_memgrowth.cpp', args=['-sMALLOC=emmalloc', '-sALLOW_MEMORY_GROWTH=1', '-sABORTING_MALLOC=0', '-sASSERTIONS=2', '-sMINIMAL_RUNTIME=1']) diff --git a/test/test_core.py b/test/test_core.py index ad64bda589ce2..cc12f2a8514e2 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -795,7 +795,7 @@ def test_emmalloc(self, *args): @no_asan('ASan does not support custom memory allocators') @no_lsan('LSan does not support custom memory allocators') - def test_emmalloc_usable_size(self, *args): + def test_emmalloc_usable_size(self): self.set_setting('MALLOC', 'emmalloc') self.do_core_test('test_malloc_usable_size.c', regex=True) @@ -829,7 +829,7 @@ def test_emmalloc_trim(self): self.do_core_test('test_emmalloc_trim.c') # Test case against https://github.com/emscripten-core/emscripten/issues/10363 - def test_emmalloc_memalign_corruption(self, *args): + def test_emmalloc_memalign_corruption(self): self.set_setting('MALLOC', 'emmalloc') self.do_core_test('test_emmalloc_memalign_corruption.c') diff --git a/test/test_other.py b/test/test_other.py index 8f16cef823248..d835d14868b75 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -425,16 +425,12 @@ def test_export_es6_node_requires_import_meta(self): '-sENVIRONMENT=node', '-sEXPORT_ES6', '-sUSE_ES6_IMPORT_META=0']) self.assertContained('EXPORT_ES6 and ENVIRONMENT=*node* requires USE_ES6_IMPORT_META to be set', err) - @parameterized({ - '': (False,), - 'package_json': (True,), - }) @parameterized({ '': ([],), # load a worker before startup to check ES6 modules there as well 'pthreads': (['-pthread', '-sPTHREAD_POOL_SIZE=1'],), }) - def test_export_es6(self, package_json, args): + def test_export_es6(self, args): self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORT_ES6', '-o', 'hello.mjs'] + args) # In ES6 mode we use MODULARIZE, so we must instantiate an instance of the @@ -5277,7 +5273,7 @@ def test_extra_opt_levels(self): 'O1': [['-O1']], }) def test_fs_after_main(self, args): - self.do_runf('test_fs_after_main.c', 'Test passed.') + self.do_runf('test_fs_after_main.c', 'Test passed.', emcc_args=args) def test_oz_size(self): sizes = {} @@ -13725,7 +13721,7 @@ def test_emscripten_console_log(self): self.do_run_in_out_file_test('emscripten_console_log.c', emcc_args=['--pre-js', test_file('emscripten_console_log_pre.js')]) # Tests emscripten_unwind_to_js_event_loop() behavior - def test_emscripten_unwind_to_js_event_loop(self, *args): + def test_emscripten_unwind_to_js_event_loop(self): self.do_runf('test_emscripten_unwind_to_js_event_loop.c') @node_pthreads