parent
							
								
									d47ae0dc8d
								
							
						
					
					
						commit
						0b074ae555
					
				|  | @ -30,12 +30,16 @@ class Conftest(object): | ||||||
|             if anchor.check(): # we found some file object  |             if anchor.check(): # we found some file object  | ||||||
|                 self._path2confmods[None] = self.getconftestmodules(anchor) |                 self._path2confmods[None] = self.getconftestmodules(anchor) | ||||||
|                 break |                 break | ||||||
|  |         else: | ||||||
|  |             assert 0, "no root of filesystem?" | ||||||
| 
 | 
 | ||||||
|     def getconftestmodules(self, path): |     def getconftestmodules(self, path): | ||||||
|         """ return a list of imported conftest modules for the given path.  """  |         """ return a list of imported conftest modules for the given path.  """  | ||||||
|         try: |         try: | ||||||
|             clist = self._path2confmods[path] |             clist = self._path2confmods[path] | ||||||
|         except KeyError: |         except KeyError: | ||||||
|  |             if path is None: | ||||||
|  |                 raise ValueError("missing default conftest.") | ||||||
|             dp = path.dirpath() |             dp = path.dirpath() | ||||||
|             if dp == path:  |             if dp == path:  | ||||||
|                 return [self.importconftest(defaultconftestpath)] |                 return [self.importconftest(defaultconftestpath)] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue