Ejemplo n.º 1
0
 def test__parse_expression_with_empty_expression_should_raise_ExpressionError(self):
     licensing = Licensing()
     spdx_symbols = get_spdx_symbols()
     unknown_symbol = get_unknown_spdx_symbol()
     line_text = '* SPDX-License-Identifier:'
     try:
         _parse_expression(line_text, licensing, spdx_symbols, unknown_symbol)
         self.fail('ExpressionError not raised')
     except ExpressionError:
         pass
Ejemplo n.º 2
0
 def test__parse_expression_without_and_raise_exception(self):
     licensing = Licensing()
     spdx_symbols = get_spdx_symbols()
     unknown_symbol = get_unknown_spdx_symbol()
     line_text = '* SPDX-License-Identifier:     GPL-2.0+ BSD-2-Clause'
     try:
         _parse_expression(line_text, licensing, spdx_symbols, unknown_symbol)
         self.fail('exception should be raised')
     except:
         pass
Ejemplo n.º 3
0
 def test__parse_expression_with_empty_expression2_should_return_None(self):
     licensing = Licensing()
     spdx_symbols = get_spdx_symbols()
     unknown_symbol = get_unknown_spdx_symbol()
     line_text = ''
     expression = _parse_expression(line_text, licensing, spdx_symbols, unknown_symbol)
     assert expression is None