diff --git a/handbook/computing/todo.html b/handbook/computing/todo.html index faf066b0d..1410ea550 100644 --- a/handbook/computing/todo.html +++ b/handbook/computing/todo.html @@ -46,15 +46,17 @@ body {
Now run the test suite:
python manage.py test -v 3 --traceback
-This will run the entire troggle test suite of over 70 tests (it takes only a few seconds). +
This will run the entire troggle test suite of over 70 tests (it takes only a few seconds). -
-If you get an error, and you probably will, have a look in the test file, e.g. for this error: -FAIL: test_page_folk (troggle.core.TESTS.tests.PageTests) -look in the file troggle/code/TESTS/tests.py in the class PageTests. ++If you get an error, and you probably will, have a look in the source code of the test, e.g. for this error: + +
+look in the file +troggle/code/TESTS/tests.py in the class PageTests. It will also say: - File "/mnt/c/EXPO/troggle/core/TESTS/tests.py", line 266, in test_page_folk -which means that the asssert failure in on line 266 of troggle/code/TESTS/tests.py -and that the failure function is test_page_folk() +FAIL: test_page_folk (troggle.core.TESTS.tests.PageTests)
+which means that the asssert failure in on line 266 of troggle/code/TESTS/tests.py +and that the failure function is test_page_folk() . If you look at this you will see that line 264 is: - response = self.client.get('/folk/index.htm') +File "/mnt/c/EXPO/troggle/core/TESTS/tests.py", line 266, in test_page_folk
so this file is missing. Duh. Of course it is. We downloaded troggle from git but we didn't run -the standalone script to generate the folk list. It is top of the list in -http://expo.survex.com/handbook/troggle/scriptscurrent.html#folk +the standalone script to generate the folk list. +The quickest thing to do when installing troggle is to simply download a copy from the server: +response = self.client.get('/folk/index.htm')
+and run the tests again: +wget -O ../expoweb/folk/index.htm expo.survex.com/folk/index.htm
+ +python manage.py test -v 2
+ +Click on the triangle to see how to run the folk script.
+ +The folk generation script is top of the list in + + +http://expo.survex.com/handbook/troggle/scriptscurrent.html#folk +So do this: +
cd ../expoweb/folk python ../scripts/make-folklist.py-index.htm cd ../../troggle - -Or just sFTP a copy from expo.survex.com - -and run the tests again: - -python manage.py test -v 2 - -Yeah if you were paying attention, you will see that this has done a git commit for a test file -in the drawings repo locally. -Sorry about that. the test harness does not yet undo that. So you will need ot manually reverse that commit: go into your favourite git tool. In VS code the command is Commit: Undo last commit - -If you have run the test suite several times you will need to undo several commits (and delete the files producd by the test suite). - The test suite has over 70 tests but does not cover all of what troggle does and does not use any real data. You need to manually test these too, after you have done a full data import: +
+The test suite now tidies up after itself, so there should not be any temporary files left behind or local git commits that you will need to clean up. + +
The test suite has over 70 tests but does not cover all of what troggle does and does not use any real data. You need to manually test these too, after you have done a full data import:
- http://localhost:8000/pathsreport
- http://localhost:8000/stats
- http://localhost:8000/people (takes a minute or so)