title: os.path.join fails with "TypeError: object of type 'LocalPath' has no len()"
body: <p>This error appeared when trying to use the 'tmpdir' in a pytest test.</p>
  
  <blockquote>
    <p>TypeError: object of type 'LocalPath' has no len()</p>
  </blockquote>