Testler de pspec.xml dosyalarını kullansın.
This commit is contained in:
@@ -16,7 +16,7 @@ class ArchiveFileTestCase(unittest.TestCase):
|
|||||||
# pass
|
# pass
|
||||||
|
|
||||||
def testUnpackTar(self):
|
def testUnpackTar(self):
|
||||||
ctx = context.BuildContext("samples/popt/popt.pspec")
|
ctx = context.BuildContext("samples/popt/pspec.xml")
|
||||||
|
|
||||||
achv = sourcearchive.SourceArchive(ctx)
|
achv = sourcearchive.SourceArchive(ctx)
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ class ArchiveFileTestCase(unittest.TestCase):
|
|||||||
"5af9dd7d754f788cf511c57ce0af3d555fed009d")
|
"5af9dd7d754f788cf511c57ce0af3d555fed009d")
|
||||||
|
|
||||||
def testUnpackZip(self):
|
def testUnpackZip(self):
|
||||||
ctx = context.BuildContext("tests/sandbox/sandbox.pspec")
|
ctx = context.BuildContext("tests/sandbox/pspec.xml")
|
||||||
|
|
||||||
assert ctx.spec.source.archiveType == "zip"
|
assert ctx.spec.source.archiveType == "zip"
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ class ArchiveFileTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
def testMakeZip(self):
|
def testMakeZip(self):
|
||||||
# first unpack our dear sandbox.zip
|
# first unpack our dear sandbox.zip
|
||||||
ctx = context.BuildContext("tests/sandbox/sandbox.pspec")
|
ctx = context.BuildContext("tests/sandbox/pspec.xml")
|
||||||
targetDir = ctx.pkg_work_dir()
|
targetDir = ctx.pkg_work_dir()
|
||||||
achv = sourcearchive.SourceArchive(ctx)
|
achv = sourcearchive.SourceArchive(ctx)
|
||||||
achv.fetch(interactive=False)
|
achv.fetch(interactive=False)
|
||||||
@@ -82,7 +82,7 @@ class ArchiveFileTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
def testUnpackZipCond(self):
|
def testUnpackZipCond(self):
|
||||||
ctx = context.BuildContext("tests/sandbox/sandbox.pspec")
|
ctx = context.BuildContext("tests/sandbox/pspec.xml")
|
||||||
url = purl.PUrl(ctx.spec.source.archiveUri)
|
url = purl.PUrl(ctx.spec.source.archiveUri)
|
||||||
targetDir = ctx.pkg_work_dir()
|
targetDir = ctx.pkg_work_dir()
|
||||||
filePath = join(ctx.archives_dir(), url.filename())
|
filePath = join(ctx.archives_dir(), url.filename())
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from pisi import purl
|
|||||||
|
|
||||||
class FetcherTestCase(unittest.TestCase):
|
class FetcherTestCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ctx = context.BuildContext("samples/popt/popt.pspec")
|
self.ctx = context.BuildContext("samples/popt/pspec.xml")
|
||||||
self.url = purl.PUrl(self.ctx.spec.source.archiveUri)
|
self.url = purl.PUrl(self.ctx.spec.source.archiveUri)
|
||||||
self.destpath = config.config.archives_dir()
|
self.destpath = config.config.archives_dir()
|
||||||
self.fetch = fetcher.Fetcher(self.url, self.destpath)
|
self.fetch = fetcher.Fetcher(self.url, self.destpath)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from pisi import context
|
|||||||
class PackageDBTestCase(unittest.TestCase):
|
class PackageDBTestCase(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ctx = context.BuildContext('samples/popt/popt.pspec')
|
self.ctx = context.BuildContext('samples/popt/pspec.xml')
|
||||||
|
|
||||||
def testAdd(self):
|
def testAdd(self):
|
||||||
packagedb.add_package(self.ctx.spec.packages[0])
|
packagedb.add_package(self.ctx.spec.packages[0])
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from pisi import context
|
|||||||
class SourceDBTestCase(unittest.TestCase):
|
class SourceDBTestCase(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ctx = context.BuildContext("samples/popt/popt.pspec")
|
self.ctx = context.BuildContext("samples/popt/pspec.xml")
|
||||||
|
|
||||||
def testAdd(self):
|
def testAdd(self):
|
||||||
sourcedb.add_source(self.ctx.spec.source)
|
sourcedb.add_source(self.ctx.spec.source)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import pisi.util as util
|
|||||||
class SpecFileTestCase(unittest.TestCase):
|
class SpecFileTestCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.spec = specfile.SpecFile()
|
self.spec = specfile.SpecFile()
|
||||||
self.spec.read("samples/popt/popt.pspec")
|
self.spec.read("samples/popt/pspec.xml")
|
||||||
|
|
||||||
def testReadSpec(self):
|
def testReadSpec(self):
|
||||||
self.assertEqual(self.spec.source.name, "popt")
|
self.assertEqual(self.spec.source.name, "popt")
|
||||||
@@ -64,7 +64,7 @@ class SpecFileTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
def testCopy(self):
|
def testCopy(self):
|
||||||
util.check_dir(config.tmp_dir())
|
util.check_dir(config.tmp_dir())
|
||||||
self.spec.read("samples/popt/popt.pspec")
|
self.spec.read("samples/popt/pspec.xml")
|
||||||
self.spec.write(os.path.join(config.tmp_dir(), 'popt-copy.pspec'))
|
self.spec.write(os.path.join(config.tmp_dir(), 'popt-copy.pspec.xml'))
|
||||||
|
|
||||||
suite = unittest.makeSuite(SpecFileTestCase)
|
suite = unittest.makeSuite(SpecFileTestCase)
|
||||||
|
|||||||
Reference in New Issue
Block a user