File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,11 +311,11 @@ def test_coverage(self):
311311 with captured_stdout () as stdout :
312312 self ._coverage (tracer )
313313 stdout = stdout .getvalue ()
314- self .assertTrue ("pprint.py" in stdout )
315- self .assertTrue ("case.py" in stdout ) # from unittest
314+ self .assertIn ("pprint.py" , stdout )
315+ self .assertIn ("case.py" , stdout ) # from unittest
316316 files = os .listdir (TESTFN )
317- self .assertTrue ("pprint.cover" in files )
318- self .assertTrue ("unittest.case.cover" in files )
317+ self .assertIn ("pprint.cover" , files )
318+ self .assertIn ("unittest.case.cover" , files )
319319
320320 def test_coverage_ignore (self ):
321321 # Ignore all files, nothing should be traced nor printed
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ Release date: TBA
1010Core and Builtins
1111-----------------
1212
13+ - Issue #19398: Extra slash no longer added to sys.path components in case of
14+ empty compile-time PYTHONPATH components.
15+
1316- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
1417 build.
1518
Original file line number Diff line number Diff line change @@ -762,7 +762,10 @@ calculate_path(void)
762762
763763 if (defpath [0 ] != SEP ) {
764764 wcscat (buf , prefix );
765- wcscat (buf , separator );
765+ if (prefixsz >= 2 && prefix [prefixsz - 2 ] != SEP &&
766+ defpath [0 ] != (delim ? DELIM : L'\0' )) { /* not empty */
767+ wcscat (buf , separator );
768+ }
766769 }
767770
768771 if (delim ) {
You can’t perform that action at this time.
0 commit comments