Ejemplo n.º 1
0
    def test_keep_file(self):
        f = sample_data.file()

        assert self.utils._keep_file(True, FilterAction.INCLUDE)
        
        assert not self.utils._keep_file(True, FilterAction.EXCLUDE)
        
        assert not self.utils._keep_file(False, FilterAction.INCLUDE)
        
        assert self.utils._keep_file(False, FilterAction.EXCLUDE)
Ejemplo n.º 2
0
 def test_extract_license(self):
     f = sample_data.file()
     fl = self.utils._extract_license(f)
     expected_l = {'gpl-3.0-or-later', 'gpl-2.0-or-later'}
     assert expected_l == fl
Ejemplo n.º 3
0
 def test_extract_license(self):
     lic = self.utils._extract_license(sample_data.file())
     assert  lic == \
         {"gpl-2.0-or-later", "gpl-3.0-or-later"} or \
         {"gpl-3.0-or-later", "gpl-2.0-or-later"}
Ejemplo n.º 4
0
 def test_isdir(self):
     assert not self.utils._isdir(sample_data.file())
     assert self.utils._isdir(sample_data.dir())