From d3b55f78898063809a49ecb4da411feb23a5cd43 Mon Sep 17 00:00:00 2001 From: Rafael Gort <rafael.gort@xfel.eu> Date: Thu, 30 Apr 2020 22:27:29 +0200 Subject: [PATCH] Added readme in test folder. --- src/toolbox_scs/test/README.rst | 75 +++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/toolbox_scs/test/README.rst diff --git a/src/toolbox_scs/test/README.rst b/src/toolbox_scs/test/README.rst new file mode 100644 index 0000000..89947f7 --- /dev/null +++ b/src/toolbox_scs/test/README.rst @@ -0,0 +1,75 @@ +============ +Test modules +============ + +Comments +======== + +The code below is intended to be executed from the command line in the directory: +toolbox\_scs/test. + +The test suites directly import the toolbox\_scs/ package. The idea is that problems related to packaging come up immediately (changing folder structure, breaking relative dependencies between the subpackages ....). + +Requirements to run the code are: + +* loaded anaconda3 environment +* DevelopmentRG branch of euxfel\_bunch\_pattern package installed locally. (will be added to env soon) +* local installation of toolbox\_scs using pip (pip install --user .) + +*Comment*: During development, use the -e flag when installing via pip, such that changes become effective immediately. + +Usage +===== + +* **Help message** + +.. code:: bash + + python test_top_level --help + + +.. parsed-literal:: + + usage: test_top_level.py [-h] [--list-suites] [--run-suites S [S ...]] + + optional arguments: + -h, --help show this help message and exit + --list-suites list possible test suites + --run-suites S [S ...] + a list of valid test suites + +* **List available test suites** + +.. code:: bash + + python test_top_level --list-suites + + +.. parsed-literal:: + + + Possible test suites: + ------------------------- + packaging + load + ------------------------- + +* **Run selected test suites** + +.. code:: bash + + python3 test_top_level --run-suites packaging + + +.. parsed-literal:: + + test_constant (__main__.TestToolbox) ... INFO:extra_data.read_machinery:Found proposal dir '/gpfs/exfel/exp/SCS/201901/p002212' in 0.055 s + DEBUG:extra_data.run_files_map:Loaded cached files map from /gpfs/exfel/exp/SCS/201901/p002212/scratch/.karabo_data_maps/raw_r0235.json + DEBUG:extra_data.run_files_map:Loaded cached files map in 0.29 s + DEBUG:extra_data.reader:Opened run with 313 files in 0.22 s + ok + + ---------------------------------------------------------------------- + Ran 1 test in 0.616s + + OK \ No newline at end of file -- GitLab