File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -758,22 +758,21 @@ def test_concurren_open_error_reporting(file_inmemory):
758758 n_threads = 4
759759 n_trials_per_thread = 10
760760
761- n_reported_errors = 0
761+ n_reported_errors = [ 0 ]
762762
763763 def target ():
764- nonlocal n_reported_errors
765764 for _ in range (n_trials_per_thread ):
766765 try :
767766 sf .SoundFile (file_inmemory )
768767 except sf .LibsndfileError :
769- n_reported_errors += 1
768+ n_reported_errors [ 0 ] += 1
770769
771770 threads = [threading .Thread (target = target ) for _ in range (n_threads )]
772771 for thread in threads :
773772 thread .start ()
774773 for thread in threads :
775774 thread .join ()
776- assert n_reported_errors == n_threads * n_trials_per_thread
775+ assert n_reported_errors [ 0 ] == n_threads * n_trials_per_thread
777776
778777
779778# -----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments