tests: makeFileUpload: Use unittest addCleanup() to close files.
This executes even if setup() encounters an error and the cleanup hook is added when opening the file, not later on. Also, unify makeFileUpload() and makeFilePath() to remove duplicated code. Co-authored-by: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#708237
external
|
ERP5.CodingStyleTest-Master |
00:56:11
|
||||||
passed |
#708194
external
|
ERP5.CodingStyleTest-TestRunner1 |
00:58:43
|
||||||
failed |
#708226
external
|
ERP5.PerformanceTest-Master |
00:35:18
|
||||||
failed |
#708196
external
|
ERP5.PerformanceTest-TestRunner1 |
00:34:44
|
||||||
failed |
#708238
external
|
ERP5.UnitTest-Master |
02:47:30
|
||||||
passed |
#708195
external
|
ERP5.UnitTest-TestRunner1 |
01:59:59
|
||||||
passed |
#708216
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:23:46
|
||||||
passed |
#708230
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:27:03
|
||||||
passed |
#708212
external
|
Wendelin.UnitTest-Master |
00:34:17
|
||||||