Skip to content

Commit 9338e03

Browse files
committed
[GR-21590] Update imports
PullRequest: graalpython/1791
2 parents ebded0c + 7cd1bc2 commit 9338e03

26 files changed

+53
-45
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "ea08890c99fa458eedbe654f6d413cfbd995f8a8" }
1+
{ "overlay": "66031a14f4fa7802efbd25dc758e08a4c94f2579" }

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/interop/JavaInteropTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ boolean isMemberInvocable(String member) {
336336
@ExportMessage
337337
Object invokeMember(String member, Object... arguments) throws ArityException, UnknownIdentifierException {
338338
if (arguments.length != 0) {
339-
throw ArityException.create(0, arguments.length);
339+
throw ArityException.create(0, 0, arguments.length);
340340
} else if (!member.equals("getMyName")) {
341341
throw UnknownIdentifierException.create(member);
342342
} else {
@@ -392,7 +392,7 @@ boolean isExecutable() {
392392
@ExportMessage
393393
Object execute(Object... arguments) throws ArityException {
394394
if (arguments.length != 0) {
395-
throw ArityException.create(0, arguments.length);
395+
throw ArityException.create(0, 0, arguments.length);
396396
} else {
397397
return self.getMyName();
398398
}

graalpython/com.oracle.graal.python.test/src/graalpytest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
'test_import',
6060
'test_subprocess',
6161
'test_posix',
62+
# trying to avoid transient issues there, not sure about the reason
63+
'test_unittest',
6264
]
6365

6466

graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@
3737
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3838
# SOFTWARE.
3939

40-
import sys
41-
4240
import glob
43-
import test
44-
4541
import os
4642
import subprocess
43+
import sys
44+
import test
4745

4846
if os.environ.get("ENABLE_CPYTHON_TAGGED_UNITTESTS") == "true" or __name__ == "__main__":
4947
TAGS_DIR = os.path.join(os.path.dirname(__file__), "unittest_tags")
@@ -225,23 +223,31 @@ def main():
225223
print("*stderr*")
226224
print(p.stderr)
227225

228-
passing_tests = []
226+
if p.returncode == -9:
227+
print(
228+
f"\nTimeout (return code -9)\nyou can try to increase the current timeout {tout}s by using --timeout=NNN")
229+
230+
passing_tests = set()
231+
failing_tests = set()
229232

230233
# n.b.: we add a '*' in the front, so that unittests doesn't add
231234
# its own asterisks, because now this is already a pattern
232235
for funcname, classname, result in parse_unittest_output(p.stderr):
233236
# We consider skipped tests as passing in order to avoid a situation where a Linux run
234237
# untags a Darwin-only test and vice versa
238+
pattern = f"*{classname}.{funcname}"
235239
if result == 'ok' or result.startswith('skipped'):
236-
passing_tests.append(f"*{classname}.{funcname}")
240+
passing_tests.add(pattern)
241+
else:
242+
failing_tests.add(pattern)
237243

238244
with open(tagfile, "w") as f:
239-
for passing_test in sorted(passing_tests):
245+
for passing_test in sorted(passing_tests - failing_tests):
240246
f.write(passing_test)
241247
f.write("\n")
242248
if not passing_tests:
243249
os.unlink(tagfile)
244-
print("No successful tests detected (you can try to increase the timeout by using --timeout=NNN)")
250+
print("No successful tests detected")
245251
break
246252

247253
if p.returncode == 0:
@@ -250,10 +256,6 @@ def main():
250256
continue
251257
print(f"Suite succeeded with {len(passing_tests)} tests")
252258
break
253-
elif p.returncode == -9:
254-
print(
255-
f"\nTimeout (return code -9)\nyou can try to increase the current timeout {tout}s by using --timeout=NNN")
256-
break
257259
else:
258260
print(f"Suite failed, retrying with {len(passing_tests)} tests")
259261

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_concurrent_futures.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
*graalpython.lib-python.3.test.test_concurrent_futures.FutureTests.test_result_with_success
1919
*graalpython.lib-python.3.test.test_concurrent_futures.FutureTests.test_result_with_timeout
2020
*graalpython.lib-python.3.test.test_concurrent_futures.FutureTests.test_running
21-
*graalpython.lib-python.3.test.test_concurrent_futures.ProcessPoolForkProcessPoolExecutorTest.test_max_workers_too_large
2221
*graalpython.lib-python.3.test.test_concurrent_futures.ProcessPoolForkProcessPoolExecutorTest.test_no_stale_references
22+
*graalpython.lib-python.3.test.test_concurrent_futures.ProcessPoolForkProcessPoolShutdownTest.test_run_after_shutdown
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*graalpython.lib-python.3.test.test_doctest2.TestMain.test_main

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_httpservers.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
*graalpython.lib-python.3.test.test_httpservers.BaseHTTPServerTestCase.test_version_none
3636
*graalpython.lib-python.3.test.test_httpservers.BaseHTTPServerTestCase.test_version_none_get
3737
*graalpython.lib-python.3.test.test_httpservers.CGIHTTPServerTestCase.test_authorization
38+
*graalpython.lib-python.3.test.test_httpservers.CGIHTTPServerTestCase.test_headers_and_content

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_import.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*graalpython.lib-python.3.test.test_import.__init__.GetSourcefileTests.test_get_sourcefile_no_source
1616
*graalpython.lib-python.3.test.test_import.__init__.ImportTests.test_bogus_fromlist
1717
*graalpython.lib-python.3.test.test_import.__init__.ImportTests.test_case_sensitivity
18-
*graalpython.lib-python.3.test.test_import.__init__.ImportTests.test_concurrency
1918
*graalpython.lib-python.3.test.test_import.__init__.ImportTests.test_delete_builtins_import
2019
*graalpython.lib-python.3.test.test_import.__init__.ImportTests.test_dll_dependency_import
2120
*graalpython.lib-python.3.test.test_import.__init__.ImportTests.test_double_const

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_importlib.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,6 @@
629629
*test.test_importlib.test_abc.Frozen_InspectLoader.test_subclasses
630630
*test.test_importlib.test_abc.Frozen_InspectLoader.test_superclasses
631631
*test.test_importlib.test_abc.Frozen_InspectLoaderDefaultsTests.test_get_source
632-
*test.test_importlib.test_abc.Frozen_InspectLoaderDefaultsTests.test_get_source
633-
*test.test_importlib.test_abc.Frozen_InspectLoaderDefaultsTests.test_is_package
634632
*test.test_importlib.test_abc.Frozen_InspectLoaderDefaultsTests.test_is_package
635633
*test.test_importlib.test_abc.Frozen_InspectLoaderGetCodeTests.test_get_code
636634
*test.test_importlib.test_abc.Frozen_InspectLoaderGetCodeTests.test_get_code_source_is_None
@@ -697,8 +695,6 @@
697695
*test.test_importlib.test_abc.Source_InspectLoader.test_subclasses
698696
*test.test_importlib.test_abc.Source_InspectLoader.test_superclasses
699697
*test.test_importlib.test_abc.Source_InspectLoaderDefaultsTests.test_get_source
700-
*test.test_importlib.test_abc.Source_InspectLoaderDefaultsTests.test_get_source
701-
*test.test_importlib.test_abc.Source_InspectLoaderDefaultsTests.test_is_package
702698
*test.test_importlib.test_abc.Source_InspectLoaderDefaultsTests.test_is_package
703699
*test.test_importlib.test_abc.Source_InspectLoaderGetCodeTests.test_get_code
704700
*test.test_importlib.test_abc.Source_InspectLoaderGetCodeTests.test_get_code_source_is_None

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_weakref.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
*graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_callback_in_cycle_4
3232
*graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_callbacks_protected
3333
*graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_cfunction
34+
*graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_classes
3435
*graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_constructor_kwargs
3536
*graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_equality
3637
*graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_hashing
@@ -63,6 +64,7 @@
6364
*graalpython.lib-python.3.test.test_weakref.WeakKeyDictionaryTestCase.test_values
6465
*graalpython.lib-python.3.test.test_weakref.WeakKeyDictionaryTestCase.test_write
6566
*graalpython.lib-python.3.test.test_weakref.WeakMethodTestCase.test_alive
67+
*graalpython.lib-python.3.test.test_weakref.WeakMethodTestCase.test_callback_when_object_dead
6668
*graalpython.lib-python.3.test.test_weakref.WeakMethodTestCase.test_equality
6769
*graalpython.lib-python.3.test.test_weakref.WeakMethodTestCase.test_hashing
6870
*graalpython.lib-python.3.test.test_weakref.WeakMethodTestCase.test_no_cycles

0 commit comments

Comments
 (0)