This repository was archived by the owner on Jul 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +27
-12
lines changed
Expand file tree Collapse file tree 1 file changed +27
-12
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,33 @@ namespace Python.EmbeddingTest
55{
66 public class PyTupleTest
77 {
8+ /// <summary>
9+ /// Test IsTupleType without having to Initialize a tuple.
10+ /// PyTuple constructor use IsTupleType. This decouples the tests.
11+ /// </summary>
12+ [ Test ]
13+ public void TestStringIsTupleType ( )
14+ {
15+ using ( Py . GIL ( ) )
16+ {
17+ var s = new PyString ( "foo" ) ;
18+ Assert . IsFalse ( PyTuple . IsTupleType ( s ) ) ;
19+ }
20+ }
21+
22+ /// <summary>
23+ /// Test IsTupleType with Tuple.
24+ /// </summary>
25+ [ Test ]
26+ public void TestPyTupleIsTupleType ( )
27+ {
28+ using ( Py . GIL ( ) )
29+ {
30+ var t = new PyTuple ( ) ;
31+ Assert . IsTrue ( PyTuple . IsTupleType ( t ) ) ;
32+ }
33+ }
34+
835 [ Test ]
936 public void TestPyTupleEmpty ( )
1037 {
@@ -39,18 +66,6 @@ public void TestPyTupleValidAppend()
3966 }
4067 }
4168
42- [ Test ]
43- public void TestPyTupleIsTupleType ( )
44- {
45- using ( Py . GIL ( ) )
46- {
47- var s = new PyString ( "foo" ) ;
48- var t = new PyTuple ( ) ;
49- Assert . IsTrue ( PyTuple . IsTupleType ( t ) ) ;
50- Assert . IsFalse ( PyTuple . IsTupleType ( s ) ) ;
51- }
52- }
53-
5469 [ Test ]
5570 public void TestPyTupleStringConvert ( )
5671 {
You can’t perform that action at this time.
0 commit comments