# HG changeset patch
# User Volker Braun <vbraun.name@gmail.com>
# Date 1356808952 0
# Node ID 1b7eaa9f68fe15b55f34206700cf8bb0c82e00fd
# Parent 0002ff91d54a87602a0f94599a9632798b757b2d
Fix doctest for amout of swap
diff git a/sage/misc/memory_info.py b/sage/misc/memory_info.py
a

b


184  184  EXAMPLES:: 
185  185  
186  186  sage: from sage.misc.memory_info import MemoryInfo 
187   sage: MemoryInfo().total_swap() > 0 
 187  sage: MemoryInfo().total_swap() >= 0 
188  188  True 
189  189  """ 
190  190  return self._parse_proc_meminfo()['total_swap'] 
… 
… 

200  200  EXAMPLES:: 
201  201  
202  202  sage: from sage.misc.memory_info import MemoryInfo 
203   sage: MemoryInfo().available_swap() > 0 
 203  sage: MemoryInfo().available_swap() in ZZ 
204  204  True 
205  205  """ 
206  206  info = self._parse_proc_meminfo() 
… 
… 

320  320  EXAMPLES:: 
321  321  
322  322  sage: from sage.misc.memory_info import MemoryInfo 
323   sage: MemoryInfo().total_swap() > 0 
 323  sage: MemoryInfo().total_swap() >= 0 
324  324  True 
325  325  """ 
326  326  return 2*self.total_ram() 
… 
… 

339  339  EXAMPLES:: 
340  340  
341  341  sage: from sage.misc.memory_info import MemoryInfo 
342   sage: MemoryInfo().available_swap() > 0 
 342  sage: MemoryInfo().available_swap() in ZZ 
343  343  True 
344  344  """ 
345  345  return 2*self.available_ram() 
… 
… 

401  401  EXAMPLES:: 
402  402  
403  403  sage: from sage.misc.memory_info import MemoryInfo 
404   sage: MemoryInfo().total_swap() > 0 
 404  sage: MemoryInfo().total_swap() >= 0 
405  405  True 
406  406  """ 
407  407  GB = 1024 * 1024 * 1024 
… 
… 

418  418  EXAMPLES:: 
419  419  
420  420  sage: from sage.misc.memory_info import MemoryInfo 
421   sage: MemoryInfo().available_swap() > 0 
 421  sage: MemoryInfo().available_swap() in ZZ 
422  422  True 
423  423  """ 
424  424  return self.total_swap() 