File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -384,12 +384,14 @@ def test_exec_sync(tmp_path):
384
384
385
385
assert report_diff_values (table , actual_table , fileobj = sys .stdout )
386
386
387
- # check file handlers, too
388
- with open (os .path .join (tmp_path , 'test_open_file_handler.xml' ), 'w+b' ) as open_file :
389
- cadc .exec_sync ('some query' , output_file = open_file )
387
+ # check file handlers, but skip on windows as it has issues with
388
+ # context managers and open files
389
+ if not sys .platform .startswith ('win' ):
390
+ with open (os .path .join (tmp_path , 'test_open_file_handler.xml' ), 'w+b' ) as open_file :
391
+ cadc .exec_sync ('some query' , output_file = open_file )
390
392
391
- actual = parse (os .path .join (tmp_path , 'test_open_file_handler.xml' ))
392
- assert report_diff_values (table , actual_table , fileobj = sys .stdout )
393
+ actual = parse (os .path .join (tmp_path , 'test_open_file_handler.xml' ))
394
+ assert report_diff_values (table , actual_table , fileobj = sys .stdout )
393
395
394
396
395
397
@patch ('astroquery.cadc.core.CadcClass.exec_sync' , Mock ())
You can’t perform that action at this time.
0 commit comments