@@ -1520,7 +1520,6 @@ def _get_chdir_exception(self):
15201520 # string and instead capture the exception that we want to see
15211521 # below for comparison.
15221522 desired_exception = e
1523- desired_exception .strerror += ': ' + repr (self ._nonexistent_dir )
15241523 else :
15251524 self .fail ("chdir to nonexistent directory %s succeeded." %
15261525 self ._nonexistent_dir )
@@ -1537,6 +1536,7 @@ def test_exception_cwd(self):
15371536 # it up to the parent process as the correct exception.
15381537 self .assertEqual (desired_exception .errno , e .errno )
15391538 self .assertEqual (desired_exception .strerror , e .strerror )
1539+ self .assertEqual (desired_exception .filename , e .filename )
15401540 else :
15411541 self .fail ("Expected OSError: %s" % desired_exception )
15421542
@@ -1551,6 +1551,7 @@ def test_exception_bad_executable(self):
15511551 # it up to the parent process as the correct exception.
15521552 self .assertEqual (desired_exception .errno , e .errno )
15531553 self .assertEqual (desired_exception .strerror , e .strerror )
1554+ self .assertEqual (desired_exception .filename , e .filename )
15541555 else :
15551556 self .fail ("Expected OSError: %s" % desired_exception )
15561557
@@ -1564,6 +1565,7 @@ def test_exception_bad_args_0(self):
15641565 # it up to the parent process as the correct exception.
15651566 self .assertEqual (desired_exception .errno , e .errno )
15661567 self .assertEqual (desired_exception .strerror , e .strerror )
1568+ self .assertEqual (desired_exception .filename , e .filename )
15671569 else :
15681570 self .fail ("Expected OSError: %s" % desired_exception )
15691571
0 commit comments