
from nipype.testing.utils import TempFATFS
from nose.tools import assert_true


def test_tempfatfs():
    with TempFATFS() as tmpdir:
        yield assert_true, tmpdir is not None


import os
import warnings
from nipype.testing.utils import TempFATFS
from nose.tools import assert_true


def test_tempfatfs():
    try:
        fatfs = TempFATFS()
    except IOError:
        warnings.warn("Cannot mount FAT filesystems with FUSE")
    else:
        with fatfs as tmpdir:
            yield assert_true, os.path.exists(tmpdir)

Add warning for TempFATFS test
TEST: Add warning for TempFATFS test

  
+ import os
+ import warnings
  from nipype.testing.utils import TempFATFS
  from nose.tools import assert_true
  
  
  def test_tempfatfs():
-     with TempFATFS() as tmpdir:
-         yield assert_true, tmpdir is not None
+     try:
+         fatfs = TempFATFS()
+     except IOError:
+         warnings.warn("Cannot mount FAT filesystems with FUSE")
+     else:
+         with fatfs as tmpdir:
+             yield assert_true, os.path.exists(tmpdir)
  
Add warning for TempFATFS test
## Code Before:

from nipype.testing.utils import TempFATFS
from nose.tools import assert_true


def test_tempfatfs():
    with TempFATFS() as tmpdir:
        yield assert_true, tmpdir is not None

## Instruction:
Add warning for TempFATFS test
## Code After:

import os
import warnings
from nipype.testing.utils import TempFATFS
from nose.tools import assert_true


def test_tempfatfs():
    try:
        fatfs = TempFATFS()
    except IOError:
        warnings.warn("Cannot mount FAT filesystems with FUSE")
    else:
        with fatfs as tmpdir:
            yield assert_true, os.path.exists(tmpdir)
