Skip to content

Commit

Permalink
Fix tests on stable
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Jun 17, 2020
1 parent 3a08376 commit 6f284d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion tests/test_dunder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,11 @@ async def main():
# but we see still errors on Github actions...
if sys.platform == "win32" and sys.version_info >= (3, 8, 0):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
loop = asyncio.get_event_loop()
try:
loop = asyncio.get_event_loop()
except RuntimeError: # RuntimeError: There is no current event loop in thread 'Dummy-1'.
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
assert loop.run_until_complete(main()) is None
loop.close()
"#
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/invalid_pymethod_names.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ error: name not allowed with this attribute
--> $DIR/invalid_pymethod_names.rs:10:5
|
10 | #[name = "num"]
| ^^^^^^^^^^^^^^^
| ^

error: #[name] can not be specified multiple times
--> $DIR/invalid_pymethod_names.rs:17:5
|
17 | #[name = "foo"]
| ^^^^^^^^^^^^^^^
| ^

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

0 comments on commit 6f284d3

Please sign in to comment.