Bug #24842

Fix unit tests as of 08/22

Added by Marco Mambelli 2 months ago. Updated 13 days ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
First Occurred:
Occurs In:


#1 Updated by Marco Mambelli about 1 month ago

The only test left to fix is ./
  • there are problems in the matching of jobs and resources
  • there may be some calculation problem due to '/' being different from '//' also when using integers
  • there may be some problem due to incorrect use of pickle. The protocol in python2 was ASCII content, so text files were OK (binary suggested). Not any more. And we have some code where pickle files are opened as text. I did a quick survey of the code: there are over 90 lines where pickle is used and need to be revised. See [#24931]
  • There may be some problem w/ None values

Things need to be inspected and sometime exceptions temporary unmasked (we have some bare except: in the code)

Some notes about the fixes:
1. i found that the wrappers around M2Crypto had some bytes/str inconsistency that I fixed.
In particular a code like str_str = "%s" % bytes_str was used many time (both %s or %r do the same) and produces the wrong result b'CONTENT_OF_BYTES_STR' with 3 chars added, b'', increasing the size of the string (there were some key size mismatch), this is a representation (more or less) of the variable, bytes must be decoded to become a string.
I added in lib/ constants and a function to help w/ conversions.
2. there was some splitting of bytes w/ str constants
3. some of the errors were in the unit tests
4. Lib fork was also failing because a str/bytes problem: pipes are bytes streams, I corrected that in several places
- note that one of the tests is failing on the mac because epoll is not available, works on Linux
5. None values were considered empty strings for sorting in Python2. None raises an exception in sorting of string values

#2 Updated by Marco Mambelli about 1 month ago

  • Status changed from New to Resolved

All unit tests have been fixed.
On non-linux platforms the fork test using epoll is failing but that is expected since epoll is not available.
last changes in v3p3/24842_2
merged in branch_v3_9 and branch_v3_p3_a2

#3 Updated by Marco Mambelli 13 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF