##// END OF EJS Templates
Do not run POSIX-specific doctest on Windows
Nikita Kniazev -
Show More
@@ -4,6 +4,9 b' This file just contains doctests both using plain python and IPython prompts.'
4 All tests should be loaded by nose.
4 All tests should be loaded by nose.
5 """
5 """
6
6
7 import os
8
9
7 def pyfunc():
10 def pyfunc():
8 """Some pure python tests...
11 """Some pure python tests...
9
12
@@ -38,18 +41,6 b' def ipfunc():'
38 0 1 1 2 2 3
41 0 1 1 2 2 3
39
42
40
43
41 Examples that access the operating system work:
42
43 In [1]: !echo hello
44 hello
45
46 In [2]: !echo hello > /tmp/foo_iptest
47
48 In [3]: !cat /tmp/foo_iptest
49 hello
50
51 In [4]: rm -f /tmp/foo_iptest
52
53 It's OK to use '_' for the last result, but do NOT try to use IPython's
44 It's OK to use '_' for the last result, but do NOT try to use IPython's
54 numbered history of _NN outputs, since those won't exist under the
45 numbered history of _NN outputs, since those won't exist under the
55 doctest environment:
46 doctest environment:
@@ -72,6 +63,25 b' def ipfunc():'
72 return 'ipfunc'
63 return 'ipfunc'
73
64
74
65
66 def ipos():
67 """Examples that access the operating system work:
68
69 In [1]: !echo hello
70 hello
71
72 In [2]: !echo hello > /tmp/foo_iptest
73
74 In [3]: !cat /tmp/foo_iptest
75 hello
76
77 In [4]: rm -f /tmp/foo_iptest
78 """
79 pass
80
81
82 ipos.__skip_doctest__ = os.name == "nt"
83
84
75 def ranfunc():
85 def ranfunc():
76 """A function with some random output.
86 """A function with some random output.
77
87
General Comments 0
You need to be logged in to leave comments. Login now