(ert-deftest elpy-set-project-variable ()
  (elpy-testcase ((:project project-root "dir/file.py"))
    (let ((elpy-project-root project-root))
      (find-file (f-join project-root "dir/file.py"))
      (elpy-set-project-variable 'test-var t)
      (find-file (f-join project-root ".dir-locals.el"))
      (save-buffer)
      (goto-char (point-min))
      (should (re-search-forward "test-var" nil t)))))
