File tree Expand file tree Collapse file tree 3 files changed +18
-14
lines changed
Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -6774,20 +6774,21 @@ cdef class MSAFile:
67746774 raise err
67756775
67766776 # open index, if any
6777- if index is not None :
6778- self .index = index
6779- self ._msaf.ssi = self .index._ssi
6780- elif self ._reader is None :
6781- try :
6782- ssiname = f" {self.name}.ssi"
6783- self .index = SSIReader(ssiname)
6784- except FileNotFoundError:
6785- self .index = None
6786- except Exception as err:
6787- PyErr_WarnFormat(RuntimeWarning , 1 , " %S " , < PyObject* > err)
6788- self .index = None
6789- else :
6777+ if self ._reader is None or TARGET_SYSTEM != " Windows" :
6778+ if index is not None :
6779+ self .index = index
67906780 self ._msaf.ssi = self .index._ssi
6781+ elif self ._reader is None :
6782+ try :
6783+ ssiname = f" {self.name}.ssi"
6784+ self .index = SSIReader(ssiname)
6785+ except FileNotFoundError:
6786+ self .index = None
6787+ except Exception as err:
6788+ PyErr_WarnFormat(RuntimeWarning , 1 , " %S " , < PyObject* > err)
6789+ self .index = None
6790+ else :
6791+ self ._msaf.ssi = self .index._ssi
67916792
67926793 def __dealloc__ (self ):
67936794 if self ._msaf != NULL :
@@ -9293,7 +9294,7 @@ cdef class SequenceFile:
92939294 raise err
92949295
92959296 # open index, if any
9296- if self ._sqfp.format != libeasel.sqio.eslSQFILE_NCBI:
9297+ if self ._sqfp.format != libeasel.sqio.eslSQFILE_NCBI and ( self ._reader is None or TARGET_SYSTEM ! = " Windows " ) :
92979298 if index is not None :
92989299 self .index = index
92999300 self ._sqfp.data.ascii.ssi = self .index._ssi
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ def test_msa_index_path(self):
116116 msa = msa_file .indexed ['does not exist' ]
117117
118118 @unittest .skipUnless (resource_files , "importlib.resources.files not available" )
119+ @unittest .skipIf (platform .system () == "Windows" , "unsupported on Windows" )
119120 def test_msa_index_fileobj (self ):
120121 luxc = resource_files ("pyhmmer.tests" ).joinpath ("data" , "msa" , "LuxC.sto" )
121122 if not os .path .exists (luxc ):
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ def test_sequence_index_path(self):
107107 seq = seq_file .indexed ['does not exist' ]
108108
109109 @unittest .skipUnless (resource_files , "importlib.resources.files not available" )
110+ @unittest .skipIf (platform .system () == "Windows" , "unsupported on Windows" )
110111 def test_sequence_index_path_format_error (self ):
111112 luxc = resource_files ("pyhmmer.tests" ).joinpath ("data" , "seqs" , "938293.PRJEB85.HG003687.faa" )
112113 if not os .path .exists (luxc ):
@@ -120,6 +121,7 @@ def test_sequence_index_path_format_error(self):
120121 seq = seq_file .indexed ['938293.PRJEB85.HG003684_1' ]
121122
122123 @unittest .skipUnless (resource_files , "importlib.resources.files not available" )
124+ @unittest .skipIf (platform .system () == "Windows" , "unsupported on Windows" )
123125 def test_sequence_index_fileobj (self ):
124126 luxc = resource_files ("pyhmmer.tests" ).joinpath ("data" , "seqs" , "938293.PRJEB85.HG003687.faa" )
125127 if not os .path .exists (luxc ):
You can’t perform that action at this time.
0 commit comments