Ticket #4088: tap2rpm-path-handling-4088.patch

File tap2rpm-path-handling-4088.patch, 916 bytes (added by Screwtape, 7 years ago)

Test that tap2rpm handles .tap files outside the current directory.

  • twisted/scripts/test/test_tap2rpm.py

    diff --git a/twisted/scripts/test/test_tap2rpm.py b/twisted/scripts/test/test_tap2rpm.py
    index dd7727d..e6aeefe 100644
    a b  
    44"""
    55Tests for L{twisted.scripts.tap2rpm}.
    66"""
     7import os
    78from twisted.trial.unittest import TestCase, SkipTest
    89from twisted.python import procutils
    910from twisted.python.failure import Failure
    class TestTap2RPM(TestCase): 
    364365            ))
    365366
    366367        return d
     368
     369
     370    def test_tapInOtherDirectory(self):
     371        """
     372        tap2rpm handles tapfiles outside the current directory.
     373        """
     374        # Make a tapfile outside the current directory.
     375        tempdir = self.mktemp()
     376        os.mkdir(tempdir)
     377        tapfile = self._makeTapFile(os.path.join(tempdir, "bacon"))
     378
     379        # Try and make an RPM from that tapfile.
     380        _makeRPMs(tapfile=tapfile)
     381