.. Copyright (C) ALbert Mietus, SoftwareBeterMaken.nl; 2014, 2015. Part of Pathways project -*- coding: utf-8 -*- BUGS that need fixing ===================== clear_first ----------- In .../calculators/webapp/tst/plugin/cobblestones/webMath.py **clear_first** is True (always using the default). That is wrong, and not allowing 1+2+3 Better to do that is the AST, or brick (Only) Removing it will break the example-test BUGS, which are mostly fixed ============================ RekenServer: ImportError: No module named 'plugin' -------------------------------------------------- No of the ATSes will run, as they can’t import `plugin.cobblestones` This depends on the setting of *PYTHONPATH*. When it contains a empty path (a colon/semicolon on it own), the cwd is on the PYTHONPATH. As that is “tst” dir, the plugin dir is found. Without that (semi)colon, the dir is NOT on the path, so not found, so an error is encountered. Note: In both cases (tst\)ATS is on sys.path (no 0). But that is the wrong dir Error ^^^^^ >>> ATS/logInUit.py --vector ../../tst/tst-data/sessie.csv --log=WARNING |Traceback (most recent call last): | File "ATS/logInUit.py", line 7, in | from plugin.cobblestones import sessie |ImportError: No module named 'plugin' Workaround ^^^^^^^^^^ For now, :file:`pathways/__init__.py` add the current/tst dir to the path. .. literalinclude:: /../../pathways/__init__.py :language: diff :caption: pathways/__init__.py :lines: 1,12- :emphasize-lines: 3,5 Paths ----- Due to :doc:`designNotes/RestructureExamples` several directories can have the same name, like: #. examples/calculators/**webapp**/tst/*bricks*, and #. examples/calculators/tst/*bricks*. When both are on the loadpath (*PYTHONPATH*) only the first is searched for. A module as **bricks.add** isn't found when it located in the second "bricks"; even when the first doesn't have an *add* module. Workaround ^^^^^^^^^^ For now ``Pathways/examples/calculators/webapp/tst/bricks`` is moved to ``Pathways/examples/calculators/webapp/tst/_bricks``, as it doesn't have important code .. todo:: Move _bricks back to bricks in ``Pathways/examples/calculators/webapp/tst/`` And solve this issue Known BUGS ========== :class:`pathways.puts.webput` ----------------------------- The selenium driver doesn't work with **pypy3**. Firefox is started but remains blank. After some time Firefox disappears ... .. code-block:: console :emphasize-lines: 3 (PyPy3)$ cd /Users/albert/work/Pathways/examples/calculators/src/webapp/tst (PyPy3)$ PYTHON=pypy3 make test # or test1 @@ FAILED to run the test, due Message: 'Can\'t load the profile. Profile Dir: /var/folders/...... :file:`examples/calculators/webapp/tst/plugin/cobblestones/webMath.py` ----------------------------------------------------------------------- Function :func:`Webmath.__calc` has a ``clear_first`` parameter, which is always True. This is considered as a **WRONG HACK**. This results in clicking the 'clear' button; before each calculation. Which results in correct additions. But that is not how normal people act. Without this (or by setting it for False) the calculation are wrong (as the old value is the start of the next input) >>> 5 + 7 ==> 12 >>> 1 + 2 ==> 123 # WRONG The '1' is appended to the string '12', becoming 121. Adding 2 (``+ 2``) results in 123 Temporally code =============== dev: Generic ATS for all calculators -------------------------------------- I'm busy with generic ATS scripts for calculator/webapp and calculator/server. It's kind of hard. And there are all kind of environmental relations. Sometimes selenium wil not start/run/load, (see below). And hardcoded paths, techno dependencies, ect. So a lot of (temporally) changes and files are added EXTRA files ^^^^^^^^^^^ A few extra (failing) test:: | examples/calculators/tryout/server.combi_g.sh | examples/calculators/tryout/webapp.telop_g.sh | examples/calculators/tryout/_shared.sh *support* These following '**_g**' files are modifications of the normal files:: | examples/calculators/src/webapp/tst/ATS/telop_g.py | examples/calculators/src/server/tst/ATS/combi_g.py Running the extra tests ^^^^^^^^^^^^^^^^^^^^^^^ The output is shortened .. code-block:: console :emphasize-lines: 7-8, 16-17 (Python3)$ (cd examples/calculators/src/server; ../rekenServer.py &) # run the server (Python3)$ cd examples/calculators/tryout # DEBUG=yes in env (pre prepend) will add debug-logging (Python3)$./webapp.telop_g.sh ## 2015-01-10 00:08:17,323 ERROR xmlrpcPut::xml_call # The rekenserver does not support widget; details: :method "widget" is not supported'> @@ FAILED to run the test, due a TstException: ('The rekenserver does not support %s; details: %s', 'widget', :method "widget" is not supported'>) [ ... the webapp is OK ... ] === All test are run OK (Python3)$ ./server.combi_g.sh Testing SRV: --gate=/Users/albert/work/Pathways/examples/calculators/src/server/tst:gate.rekenMachine:RekenServer --put=http://localhost:37421 === All test are run OK Testing APP: --gate=/Users/albert/work/Pathways/examples/calculators/src/webapp/tst:gate.rekenApp:RekenApp --put=file:///Users/albert/work/Pathways/examples/calculators/src/webapp/js_calc.html ## 2015-01-10 00:05:19,159 WARNING sessie::_loginout_check # LOGIN/OUT FAILED (on message): expect=('True', 'Welcome *'), got=(True, '0'); found= @@ One or more tests FAILED