Skip to content

Commit 6f284d3

Browse files
committed
Fix tests on stable
1 parent 3a08376 commit 6f284d3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

tests/test_dunder.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,11 @@ async def main():
612612
# but we see still errors on Github actions...
613613
if sys.platform == "win32" and sys.version_info >= (3, 8, 0):
614614
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
615-
loop = asyncio.get_event_loop()
615+
try:
616+
loop = asyncio.get_event_loop()
617+
except RuntimeError: # RuntimeError: There is no current event loop in thread 'Dummy-1'.
618+
loop = asyncio.new_event_loop()
619+
asyncio.set_event_loop(loop)
616620
assert loop.run_until_complete(main()) is None
617621
loop.close()
618622
"#

tests/ui/invalid_pymethod_names.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ error: name not allowed with this attribute
22
--> $DIR/invalid_pymethod_names.rs:10:5
33
|
44
10 | #[name = "num"]
5-
| ^^^^^^^^^^^^^^^
5+
| ^
66

77
error: #[name] can not be specified multiple times
88
--> $DIR/invalid_pymethod_names.rs:17:5
99
|
1010
17 | #[name = "foo"]
11-
| ^^^^^^^^^^^^^^^
11+
| ^
1212

1313
error: name not allowed with this attribute
1414
--> $DIR/invalid_pymethod_names.rs:24:5
1515
|
1616
24 | #[name = "makenew"]
17-
| ^^^^^^^^^^^^^^^^^^^
17+
| ^

0 commit comments

Comments
 (0)