You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d4ed8cc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: tests/DotPython.DifferentialTests/ManagedCliDifferentialTests.cs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -477,6 +477,12 @@ public sealed class ManagedCliDifferentialTests
477
477
[InlineData(
478
478
"class Fut:\n def __await__(self):\n got = yield 'tick'\n return got\nasync def paced():\n for i in range(2):\n v = await Fut()\n yield i * 100 + len(v)\nasync def suspended_comp():\n values = [x async for x in paced()]\n print('collected', values)\ns = suspended_comp()\nprint(s.send(None))\nprint(s.send('ab'))\ntry:\n s.send('xyz')\nexcept StopIteration:\n pass\nasync def nums():\n for i in range(4):\n yield i\nasync def nested_comp():\n grid = [[y async for y in nums()] for _ in range(2)]\n print(grid)\nn = nested_comp()\ntry:\n n.send(None)\nexcept StopIteration:\n pass"
479
479
)]
480
+
[InlineData(
481
+
"class A:\n def who(self): return 'A'\n tag = 'a'\nclass B(A):\n def who(self): return 'B'\nclass C(A):\n def who(self): return 'C'\n tag = 'c'\nclass D(B, C):\n pass\nprint([t.__name__ for t in D.__mro__ if t.__name__ != 'object'])\nprint([t.__name__ for t in D.__bases__])\nd = D()\nprint(d.who(), d.tag, D().who())\nprint(isinstance(d, A), isinstance(d, B), isinstance(d, C))\ntry:\n class Bad(A, A):\n pass\nexcept TypeError as e:\n print('e1:', e)\nclass X: pass\nclass Y(X): pass\ntry:\n class Z(X, Y):\n pass\nexcept TypeError as e:\n print('e2:', e)\nmatch d:\n case C():\n print('pattern-matches-C')"
0 commit comments