summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alltests.cmd8
-rw-r--r--howto.txt6
-rw-r--r--lab/trace_sample.py32
-rw-r--r--switchpy.cmd14
4 files changed, 50 insertions, 10 deletions
diff --git a/alltests.cmd b/alltests.cmd
index 425fe1c1..213c71b9 100644
--- a/alltests.cmd
+++ b/alltests.cmd
@@ -1,11 +1,11 @@
@echo off
@rem all the Python installs have a .pth pointing to the egg file created by
-@rem 2.5, so install the testdata in 2.5
-call \ned\bin\switchpy c:\vpy\coverage\25 quiet
+@rem 2.6, so install the testdata in 2.5
+call switchpy c:\vpy\coverage\26 quiet
make --quiet testdata
-for %%v in (23 24 25 26 27 31 32) do (
- call \ned\bin\switchpy c:\vpy\coverage\%%v
+for %%v in (24 25 26 27 31 32) do (
+ call switchpy c:\vpy\coverage\%%v
python setup.py -q develop
set COVERAGE_TEST_TRACER=c
nosetests %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/howto.txt b/howto.txt
index 2b1536bd..13dc41a8 100644
--- a/howto.txt
+++ b/howto.txt
@@ -52,7 +52,7 @@
* Building
-- Install fixtar on any Python used to make source kits: http://bitbucket.org/ned/fixtar
+- Install fixtar on any Windows Python used to make source kits: http://bitbucket.org/ned/fixtar
- Create PythonXX\Lib\distutils\distutils.cfg::
[build]
compiler = mingw32
@@ -64,10 +64,6 @@
- On Py 2.x: need setuptools installed
- On Py 3.x: need Distribute installed
- Need nose installed
- - nose for py 2.x
- - nose3 for py 3.x
- - copy Scripts\nosetest3.exe to Scripts\nosetests.exe
- - copy Scripts\nosetest3-script.py to Scripts\nosetests-script.py
- Need to have coverage dev-installed
- In each Python installation to be used, create a "coverage_test_egg.pth"
containing::
diff --git a/lab/trace_sample.py b/lab/trace_sample.py
index 2fec9424..9fa37249 100644
--- a/lab/trace_sample.py
+++ b/lab/trace_sample.py
@@ -21,7 +21,37 @@ def trace(frame, event, arg):
return trace
+def trace2(frame, event, arg):
+ #if event == 'line':
+ global nest
+
+ print "2: %s%s %s %d" % (
+ " " * nest,
+ event,
+ os.path.basename(frame.f_code.co_filename),
+ frame.f_lineno,
+ )
+
+ if event == 'call':
+ nest += 1
+ if event == 'return':
+ nest -= 1
+
+ return trace2
+
sys.settrace(trace)
-import sample
+def bar():
+ print "nar"
+
+a = 26
+def foo(n):
+ a = 28
+ sys.settrace(sys.gettrace())
+ bar()
+ a = 30
+ return 2*n
+
+print foo(a)
+#import sample
#import littleclass
diff --git a/switchpy.cmd b/switchpy.cmd
new file mode 100644
index 00000000..089df2a5
--- /dev/null
+++ b/switchpy.cmd
@@ -0,0 +1,14 @@
+@echo off
+set PATH=.;%HOME%\bin
+set PATH=%PATH%;c:\windows\system32;c:\windows
+set PATH=%PATH%;%1\scripts;%1
+set PATH=%PATH%;C:\Program Files\Mercurial\bin
+set PATH=%PATH%;c:\cygwin\bin
+set PATH=%PATH%;c:\app\MinGW\bin
+set PYTHONPATH=;c:\ned\py
+set PYHOME=%1
+rem title Py %1
+if "%2"=="quiet" goto done
+python -c "import sys; print ('\n=== Python %%s %%s' %% (sys.version.split()[0], '='*80))"
+
+:done