def test_ctor_w_package_and_metadata_version(self): from poetry.core._vendor import pkginfo from poetry.core._vendor.pkginfo.tests import _checkSample installed = self._makeOne(pkginfo, metadata_version='1.2') self.assertEqual(installed.metadata_version, '1.2') self.assertEqual(installed.package.__name__, 'pkginfo') _checkSample(self, installed)
def test_w_package_name_and_metadata_version(self): from poetry.core._vendor.pkginfo.tests import _checkSample from poetry.core._vendor.pkginfo.tests import _checkClassifiers dist = self._callFUT('pkginfo', metadata_version='1.2') self.assertEqual(dist.metadata_version, '1.2') _checkSample(self, dist) _checkClassifiers(self, dist)
def test_w_package_name(self): from poetry.core._vendor.pkginfo.tests import _defaultMetadataVersion EXPECTED = _defaultMetadataVersion() from poetry.core._vendor.pkginfo.tests import _checkSample dist = self._callFUT('pkginfo') self.assertEqual(dist.metadata_version, EXPECTED) _checkSample(self, dist)
def test_ctor_w_name(self): from poetry.core._vendor import pkginfo from poetry.core._vendor.pkginfo.tests import _checkSample from poetry.core._vendor.pkginfo.tests import _defaultMetadataVersion EXPECTED = _defaultMetadataVersion() installed = self._makeOne('pkginfo') self.assertEqual(installed.metadata_version, EXPECTED) self.assertEqual(installed.package, pkginfo) self.assertEqual(installed.package_name, 'pkginfo') _checkSample(self, installed)
def test_ctor_w_path(self): from poetry.core._vendor.pkginfo.tests import _checkSample develop = self._makeOne('.') _checkSample(self, develop)