1313from nose .tools import raises
1414
1515from matplotlib import cbook
16- from matplotlib .testing .conversion_cache import ConversionCache , CacheError
16+ from matplotlib .testing ._conversion_cache import _ConversionCache , _CacheError
1717
1818
1919def test_cache_basic ():
@@ -22,7 +22,7 @@ def test_cache_basic():
2222 def intmp (f ):
2323 return os .path .join (tmpdir , f )
2424 try :
25- cache = ConversionCache (intmp ('cache' ))
25+ cache = _ConversionCache (intmp ('cache' ))
2626 with open (intmp ('fake.pdf' ), 'w' ) as pdf :
2727 pdf .write ('this is a fake pdf file' )
2828 with open (intmp ('fake.svg' ), 'w' ) as svg :
@@ -63,7 +63,7 @@ def test_cache_expire():
6363 def intmp (* f ):
6464 return os .path .join (tmpdir , * f )
6565 try :
66- cache = ConversionCache (intmp ('cache' ), 10 )
66+ cache = _ConversionCache (intmp ('cache' ), 10 )
6767 for i in range (5 ):
6868 filename = intmp ('cache' , 'file%d.png' % i )
6969 with open (filename , 'w' ) as f :
@@ -95,9 +95,9 @@ def intmp(*f):
9595
9696def test_cache_default_dir ():
9797 try :
98- path = ConversionCache .get_cache_dir ()
98+ path = _ConversionCache .get_cache_dir ()
9999 assert path .endswith ('test_cache' )
100- except CacheError :
100+ except _CacheError :
101101 pass
102102
103103
@@ -107,7 +107,7 @@ def test_cache_default_dir():
107107def test_cache_mkdir_error (mkdirs ):
108108 tmpdir = tempfile .mkdtemp ()
109109 try :
110- c = ConversionCache (os .path .join (tmpdir , 'cache' ))
110+ c = _ConversionCache (os .path .join (tmpdir , 'cache' ))
111111 finally :
112112 shutil .rmtree (tmpdir )
113113
@@ -120,6 +120,6 @@ def test_cache_unwritable_error(access):
120120 cachedir = os .path .join (tmpdir , 'test_cache' )
121121 try :
122122 cbook .mkdirs (cachedir )
123- c = ConversionCache (cachedir )
123+ c = _ConversionCache (cachedir )
124124 finally :
125125 shutil .rmtree (tmpdir )
0 commit comments