File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151import tempfile
5252import copy
5353import factory .random
54+
5455from fnmatch import fnmatch
56+ from pathlib import Path
5557
5658from coverage .report import Reporter
5759from coverage .results import Numbers
@@ -764,6 +766,7 @@ def setup_test_environment(self, **kwargs):
764766 )
765767 self .config_file [kind ].write (json .dumps (config [kind ]).encode ())
766768 self .config_file [kind ].flush ()
769+ Path (self .config_file [kind ].name ).chmod (0o644 )
767770
768771 super (IetfTestRunner , self ).setup_test_environment (** kwargs )
769772
@@ -800,6 +803,7 @@ def validate(self, kind):
800803 testcase = TestCase ()
801804 cwd = pathlib .Path .cwd ()
802805 tmpdir = tempfile .TemporaryDirectory (prefix = "html-validate-" )
806+ Path (tmpdir .name ).chmod (0o655 )
803807 for (name , content , fingerprint ) in self .batches [kind ]:
804808 path = pathlib .Path (tmpdir .name ).joinpath (
805809 hex (fingerprint )[2 :],
@@ -828,6 +832,7 @@ def validate(self, kind):
828832 try :
829833 validation_results = json .load (stdout )
830834 except json .decoder .JSONDecodeError :
835+ stdout .seek (0 )
831836 testcase .fail (stdout .read ())
832837
833838 errors = ""
You can’t perform that action at this time.
0 commit comments