def test_newext(self):
newpath = self.root.join('samplefile.py')
-> newext = newpath.new(ext='.txt')
assert newext.basename == "samplefile.txt"
assert newext.purebasename == "samplefile"