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
5
5
{
6
6
public class PyTupleTest
7
7
{
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
+
8
35
[ Test ]
9
36
public void TestPyTupleEmpty ( )
10
37
{
@@ -39,18 +66,6 @@ public void TestPyTupleValidAppend()
39
66
}
40
67
}
41
68
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
-
54
69
[ Test ]
55
70
public void TestPyTupleStringConvert ( )
56
71
{
You can’t perform that action at this time.
0 commit comments