Ejemplo n.º 1
0
 def test_get_jar_too_many(self):
     with mock.patch.object(glob,
                            'glob',
                            return_value=[
                                'some-assembly-file.jar',
                                'another-assembly-shizzle.jar'
                            ]):
         with pytest.raises(FileNotFoundError):
             victim._get_jar()
Ejemplo n.º 2
0
 def test_get_wheel(self):
     with mock.patch.object(glob, 'glob', return_value=['some.whl']):
         res = victim._get_jar()
         assert res == 'some.whl'
Ejemplo n.º 3
0
 def test_get_jar_none_found(self):
     with mock.patch.object(glob, 'glob', return_value=[]):
         with pytest.raises(FileNotFoundError):
             victim._get_jar()
Ejemplo n.º 4
0
 def test_get_jar(self):
     with mock.patch.object(glob,
                            'glob',
                            return_value=['some-assembly-file.jar']):
         res = victim._get_jar()
         assert res == 'some-assembly-file.jar'
Ejemplo n.º 5
0
 def test_get_wheel_too_many(self):
     with mock.patch.object(glob,
                            'glob',
                            return_value=['some.whl', 'another.whl']):
         with pytest.raises(FileNotFoundError):
             victim._get_jar()