Am 6. Juli 2010 10:39 schrieb Manuel Franceschini <[email protected]>:
> On Mon, Jul 5, 2010 at 8:37 PM, Balazs Lecz <[email protected]> wrote:
>> diff --git a/test/ganeti.utils_unittest.py b/test/ganeti.utils_unittest.py
>> +class TestGetMounts(unittest.TestCase):
>> +  """Test case for GetMounts()."""
>> +
>> +  TESTDATA = (
>> +    "rootfs /     rootfs rw 0 0\n" +
>> +    "none   /sys  sysfs  rw,nosuid,nodev,noexec,relatime 0 0\n" +
>> +    "none   /proc proc   rw,nosuid,nodev,noexec,relatime 0 0\n")

Use implicit string concatenation:

x = ("foo"
     "bar"
     "baz")

This is equal to x = "foobarbaz".

>> +  def tearDown(self):
>> +    os.unlink(self.tmpfile.name)
>
> By doing as explained above this explicit removal would not be necessary.

NamedTemporaryFile is automatically removed. Don't use the base class
thingies for such simple code.

Michael

Reply via email to