def test_create_in_fallback_dir(self): self.fs.chdir('/') file = io._open_or_create( self.fs.open, 'foo.bbl', 'wb', {'TEXMFOUTPUT': '/home/test'} ) self.assertEqual(file.name, '/home/test/foo.bbl') self.assertEqual(file.mode, 'wb')
def test_create(self): file = io._open_or_create(self.fs.open, 'foo.bbl', 'wb', {}) self.assertEqual(file.name, '/home/test/foo.bbl') self.assertEqual(file.mode, 'wb')