def test_parse_with_dparse_requirements(self): test_file = self.get_test_loc( 'pypi/requirements_txt/simple/requirements.txt') dependencies = [d.to_dict() for d in pypi.parse_with_dparse(test_file)] expected_loc = self.get_test_loc( 'pypi/requirements_txt/simple/output.expected.json') check_result_equals_expected_json(dependencies, expected_loc, regen=False)
def test_parse_with_dparse(self): test_file = self.get_test_loc('pypi/dparse/requirements.txt') dependencies = pypi.parse_with_dparse(test_file) assert [ DependentPackage(purl=u'pkg:pypi/lxml', requirement='==3.4.4', scope='dependencies'), DependentPackage(purl=u'pkg:pypi/requests', requirement='==2.7.0', scope='dependencies') ] == dependencies
def test_parse_with_dparse(self): test_file = self.get_test_loc('pypi/dparse/requirements.txt') dependencies = pypi.parse_with_dparse(test_file) assert dependencies == [DependentPackage(purl='pkg:pypi/[email protected]', requirement='==3.4.4', scope='dependencies', is_resolved=True), DependentPackage(purl='pkg:pypi/[email protected]', requirement='==2.7.0', scope='dependencies', is_resolved=True)]