3434 assert_equal
3535)
3636
37- from singularity .cli import Singularity
37+ from singularity .utils import get_installdir
3838import unittest
3939import tempfile
4040import shutil
@@ -55,27 +55,23 @@ class TestAnalysisClassify(unittest.TestCase):
5555
5656 def setUp (self ):
5757 self .tmpdir = tempfile .mkdtemp ()
58- self .cli = Singularity ()
59- self .container = self .cli .pull ('shub://vsoch/singularity-images' ,
60- pull_folder = self .tmpdir )
61- print (self .container )
62- self .comparator = self .cli .pull ('shub://vsoch/hello-world' ,
63- pull_folder = self .tmpdir )
64- print (self .comparator )
58+ self .pwd = get_installdir ()
59+ self .container = "%s/tests/data/busybox-2017-10-21.zip" % (self .pwd )
60+ self .comparator = "%s/tests/data/cirros-2017-10-21.zip" % (self .pwd )
6561
6662 def tearDown (self ):
6763 shutil .rmtree (self .tmpdir )
6864
6965 def test_classify (self ):
7066 print ("Testing singularity.analysis.classify.get_diff" )
71- diff = get_diff (container = self .container )
67+ diff = get_diff (image_package = self .container )
7268 self .assertTrue (len (diff )> 0 )
7369 print ("Testing singularity.analysis.classify.estimate_os" )
74- estimated_os = estimate_os (container = self .container )
75- self .assertTrue (estimated_os .startswith ('ubuntu ' ))
76- counts = file_counts (container = self .container )
70+ estimated_os = estimate_os (image_package = self .container )
71+ self .assertTrue (estimated_os .startswith ('busybox ' ))
72+ counts = file_counts (image_package = self .container )
7773 print ("Testing singularity.analysis.classify.extension_counts" )
78- counts = extension_counts (container = self .container )
74+ counts = extension_counts (image_package = self .container )
7975 self .assertTrue (len (counts )> 0 )
8076
8177
0 commit comments