• Tim Golden's avatar
    bpo-34239: Convert test_bz2 to use tempfile (#8485) · 6a62e1d3
    Tim Golden yazdı
    * bpo-34239: Convert test_bz2 to use tempfile
    
    test_bz2 currently uses the test.support.TESTFN functionality which creates a temporary file local to the test directory named around the pid.
    
    This can give rise to race conditions where tests are competing with each other to delete and recreate the file.
    
    This change converts the tests to use tempfile.mkstemp which gives a different file every time from the system's temp area
    6a62e1d3
test_bz2.py 36.8 KB