File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ class Config:
113113 files_action : Optional [FilesAction ] = None
114114 rm_paths : list [str ] = field (default_factory = list )
115115
116- def __hash__ (self ) -> int :
116+ def __hash__ (self ) -> int : # pragma: nocover
117117 return hash (self .__repr__ ())
118118
119119 @classmethod
Original file line number Diff line number Diff line change @@ -569,6 +569,12 @@ def test_specresolver():
569569 SpecResolver (spec , base_dir = "nested" ).match ([nested_path ], negated = True )
570570 )
571571
572+ assert SpecResolver (spec , base_dir = "nested" ).match_file (nested_path )
573+ assert not SpecResolver (spec , base_dir = "nested" ).match_file (
574+ nested_path , negated = True
575+ )
576+ assert SpecResolver (spec ).match_file ("../outside_file.txt" )
577+
572578 with tempfile .TemporaryDirectory () as dir :
573579 nested_dir = os .path .join (dir , "nested" )
574580 nested_path = os .path .join (nested_dir , "file1.txt" )
You can’t perform that action at this time.
0 commit comments