bbuenoun / trace-glare

Script to run dynamic glare simulations (DGP) by using Radiance raytracing
Other
0 stars 0 forks source link

Write tests #3

Closed simon-wacker closed 3 years ago

simon-wacker commented 4 years ago

Use pytest for test automation.

bbuenoun commented 4 years ago

I checked the pytest routines you made in fener, but I'm not yet able to translate them into a simple test for glare-trace. Could you please help me? Maybe you can show me some basic functions. The test would be run "trace-glare/glare$ python trace.py ../test/000 -c 5 -ab 0", and then compare the numerical values of "/trace-glare/test/output/fDGPe_0.out" with those of "/trace-glare/test/output/fDGPe_0_ref.out". The same for "time.out" and "time_ref.out"

simon-wacker commented 4 years ago

Sure, I'll have a look at it tomorrow.

I added the GNU Make targets tests and doctests to run all tests and all doctests with Pytest. They can be executed by running make tests and make doctests in the command-line.

bbuenoun commented 3 years ago

When running make tests, I get the following error (I'm missing this file):

E FileNotFoundError: [Errno 2] No such file or directory: 'tests/test_trace/test_integration/test_simple/actual_output'

/opt/anaconda/anaconda3_7/lib/python3.7/shutil.py:483: FileNotFoundError