Exemplo n.º 1
0
 def test_missing_working_dir(self):
     tmp = tempfile.mkdtemp()
     pwd = os.getcwd()
     try:
         os.chdir(tmp)
         shutil.rmtree(tmp)
         p = nice_path(__file__)
         assert p.startswith(__file__), (
                             '%s does not start with %s' % (p, __file__))
     finally:
         os.chdir(pwd)
Exemplo n.º 2
0
 def test_none_path(self):
     # an internal ImportError in Nose caused this
     eq_(nice_path(None), None)
Exemplo n.º 3
0
 def test_pyc_is_stripped(self):
     eq_(nice_path('some_file.pyc'), 'some_file.py')
Exemplo n.º 4
0
 def test_rel_path(self):
     eq_(nice_path(os.path.dirname(__file__)), 'nosenicedots/tests')