Open prjemian opened 7 years ago
When running the unit test suite, there are four temporary files left undeleted.
Here's the output (from my fork, master branch):
mintadmin@mint-vm ~/.../eclipse/suitcase $ python ./run_tests.py ============================================================================================================ test session starts ============================================================================================================= platform linux -- Python 3.6.0, pytest-3.0.6, py-1.4.31, pluggy-0.4.0 -- /home/mintadmin/Apps/BlueSky/bin/python cachedir: .cache rootdir: /home/mintadmin/Documents/eclipse/suitcase, inifile: /home/mintadmin/Apps/BlueSky/lib/python3.6/site-packages/databroker/broker.py:286: UserWarning: stop using raw fs warnings.warn("stop using raw fs") collected 29 items suitcase/tests/test_hdf5.py::test_hdf5_export_single[1] PASSED suitcase/tests/test_hdf5.py::test_hdf5_export_single_no_uid[1] PASSED suitcase/tests/test_hdf5.py::test_hdf5_export_single_stream_name[1] PASSED suitcase/tests/test_hdf5.py::test_hdf5_export_with_fields_single[1] PASSED suitcase/tests/test_hdf5.py::test_filter_fields[1] PASSED suitcase/tests/test_hdf5.py::test_hdf5_export_list[1] PASSED suitcase/tests/test_spec.py::test_multiple_headers xfail suitcase/tests/test_spec.py::test_bad_header xfail suitcase/tests/test_spec.py::test_spec_parsing PASSED suitcase/tests/test_spec.py::test_spec_attrs_smoke[sf0] PASSED suitcase/tests/test_spec.py::test_spec_attrs_smoke[sf1] PASSED suitcase/tests/test_spec.py::test_spec_to_document_bad_input xfail suitcase/tests/test_spec.py::test_spec_to_document[1-/home/mintadmin/Documents/eclipse/suitcase/suitcase/tests/data/sample-spec-file-1] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-/home/mintadmin/Documents/eclipse/suitcase/suitcase/tests/data/sample-spec-file-scan_ids1] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-/home/mintadmin/Documents/eclipse/suitcase/suitcase/tests/data/sample-spec-file-None] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-sf3-1] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-sf4-scan_ids4] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-sf5-None] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-sf6-1] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-sf7-scan_ids7] PASSED suitcase/tests/test_spec.py::test_spec_to_document[1-sf8-None] PASSED suitcase/tests/test_spec.py::test_equality PASSED suitcase/tests/test_spec.py::test_lt PASSED suitcase/tests/test_spec.py::test_round_trip_from_specfile[1] PASSED suitcase/tests/test_spec.py::test_round_trip_from_run_engine[1] PASSED suitcase/tests/test_spec.py::test_insert_specscan[1] PASSED suitcase/tests/test_spec.py::test_insert_specfile[1] PASSED suitcase/tests/test_spec.py::test_double_insert_specscan[1] PASSED suitcase/tests/test_spec.py::test_bad_document_stream xfail ========================================================================================================== short test summary info =========================================================================================================== XFAIL suitcase/tests/test_spec.py::test_multiple_headers Making sure that multiple file headers in one file raises a NotImplementedError XFAIL suitcase/tests/test_spec.py::test_bad_header Making sure that no file header in a specfile raises a NotImplementedError XFAIL suitcase/tests/test_spec.py::test_spec_to_document_bad_input Testing `spec_to_document` with bad input XFAIL suitcase/tests/test_spec.py::test_bad_document_stream Testing `insert_into_broker` with bad input =================================================================================================== 25 passed, 4 xfailed in 16.69 seconds ==================================================================================================== mintadmin@mint-vm ~/.../eclipse/suitcase $ ll /tmp/tmp* -rw-r--r-- 1 mintadmin 1959 Mar 10 11:13 /tmp/tmp12u2ljdu -rw-r--r-- 1 mintadmin 2631 Mar 10 11:13 /tmp/tmpjmnt_kt7 -rw-r--r-- 1 mintadmin 6530 Mar 10 11:13 /tmp/tmpr5f956i3 -rw-r--r-- 1 mintadmin 6530 Mar 10 11:13 /tmp/tmptexwgdl_ mintadmin@mint-vm ~/.../eclipse/suitcase $ file /tmp/tmp* /tmp/tmp12u2ljdu: ASCII text /tmp/tmpjmnt_kt7: ASCII text /tmp/tmpr5f956i3: ASCII text, with very long lines /tmp/tmptexwgdl_: ASCII text, with very long lines mintadmin@mint-vm ~/.../eclipse/suitcase $ head -5 /tmp/tmp* ==> /tmp/tmp12u2ljdu <== #F tmp12u2ljdu #E 1489165998 #D Fri Mar 10 11:13:18 2017 #C test_owner User = test_owner #O0 simulated using bluesky.examples simulated using bluesky.examples ==> /tmp/tmpjmnt_kt7 <== #F tmpjmnt_kt7 #E 1489165998 #D Fri Mar 10 11:13:18 2017 #C test_owner User = test_owner #O0 simulated using bluesky.examples simulated using bluesky.examples ==> /tmp/tmpr5f956i3 <== #F tmpr5f956i3 #E 1455912129 #D Fri Feb 19 14:02:09 2016 #C asuvorov User = asuvorov #O0 ANA_CChi ANA_CFTh ANA_CThe ANA_CY ANA_DTH ANA_DYY ANA_AY ANA_BY ANA_DY ANA_PDCW ANA_UY ANA_WChi ANA_WFTh BICD BICU BL_EN BPM1_P BPM1_DX BPM1_DY BPM1_Y BPM2_P BPM2_DX BPM2_DY BPM2_Y Chi CRL_Th CRL_X CRL_Y D1_Phi D1_The D2_Phi D2_The D3_Phi D3_The D4_Phi D4_The D5_Phi D5_The D6_Phi D6_The DCM_EN DCM_P1 DCM_PF DCM_R2 DCM_The DCM_Y DCM_Z2 D_FThe D_Phi D_The FSlitBot FSlitIn FSlitOut FSlitTop h HRM_BS HRM_DChi HRM_DIF HRM_DOF HRM_DThe HRM_DX HRM_DY HFM_DSB HFM_DSX HFM_DSY HFM_USB HFM_USX HFM_USY HRM_PD1 HRM_PD2 HRM_PD3 HRM_PD4 HRM_PD5 HRM_En HRM_UChi HRM_UIF HRM_UOF HRM_UThe HRM_UX HRM_UY JJB JJI JJO JJT k KOZ3_The KOZ3_X KOZ3_Y l MCMCHI MCMPHI MCMS2I MCMS2O MCMSB MCMST MCMTHE MCMX MCMY MCMZ PD1 PD2 PinholeDX PinholeDY Phi PinholeUX PinholeUY Slit1Bot Slit1In Slit1Out Slit1Top Slit2Bot Slit2In Slit2Out Slit2Top Slit3Bot Slit3In Slit3Out Slit3Top SAna_Bot SAna_Top SSA_B SSA_T Sample_X Sample_Y Sample_Z STower_X STower_Y STower_Z Theta Two Theta UGap VFM_DSB VFM_DSX VFM_DSY VFM_USB VFM_USX VFM_USY W_Chi W_FThe Wheel W_The ==> /tmp/tmptexwgdl_ <== #F tmptexwgdl_ #E 1455912129 #D Fri Feb 19 14:02:09 2016 #C asuvorov User = asuvorov #O0 ANA_CChi ANA_CFTh ANA_CThe ANA_CY ANA_DTH ANA_DYY ANA_AY ANA_BY ANA_DY ANA_PDCW ANA_UY ANA_WChi ANA_WFTh BICD BICU BL_EN BPM1_P BPM1_DX BPM1_DY BPM1_Y BPM2_P BPM2_DX BPM2_DY BPM2_Y Chi CRL_Th CRL_X CRL_Y D1_Phi D1_The D2_Phi D2_The D3_Phi D3_The D4_Phi D4_The D5_Phi D5_The D6_Phi D6_The DCM_EN DCM_P1 DCM_PF DCM_R2 DCM_The DCM_Y DCM_Z2 D_FThe D_Phi D_The FSlitBot FSlitIn FSlitOut FSlitTop h HRM_BS HRM_DChi HRM_DIF HRM_DOF HRM_DThe HRM_DX HRM_DY HFM_DSB HFM_DSX HFM_DSY HFM_USB HFM_USX HFM_USY HRM_PD1 HRM_PD2 HRM_PD3 HRM_PD4 HRM_PD5 HRM_En HRM_UChi HRM_UIF HRM_UOF HRM_UThe HRM_UX HRM_UY JJB JJI JJO JJT k KOZ3_The KOZ3_X KOZ3_Y l MCMCHI MCMPHI MCMS2I MCMS2O MCMSB MCMST MCMTHE MCMX MCMY MCMZ PD1 PD2 PinholeDX PinholeDY Phi PinholeUX PinholeUY Slit1Bot Slit1In Slit1Out Slit1Top Slit2Bot Slit2In Slit2Out Slit2Top Slit3Bot Slit3In Slit3Out Slit3Top SAna_Bot SAna_Top SSA_B SSA_T Sample_X Sample_Y Sample_Z STower_X STower_Y STower_Z Theta Two Theta UGap VFM_DSB VFM_DSX VFM_DSY VFM_USB VFM_USX VFM_USY W_Chi W_FThe Wheel W_The mintadmin@mint-vm ~/.../eclipse/suitcase $
Thanks for the heads up. We should be using tempfile for this.
tempfile
When running the unit test suite, there are four temporary files left undeleted.
Here's the output (from my fork, master branch):