Comments (7)
Emacs lock files endlessly trigger test runs. Autosaves are less frequent but still thorny. It would be nice if pytest-watch
could respect .gitignore
or custom regex/globs, eg: \#*\#
and .\#*
.
from pytest-watch.
This hurts me, too. In addition, emacs will create auto-saves and lockfiles in the current directory by default.
@JohnBloom as a workaround, you could try override flycheck for python (I'm using elpy) to use flymake-create-temp-with-folder-structure instead of flymake-create-temp-inplace. I'm using the following, which is quite a mouthful, so a little help from pytest-watch would be much appreciated:
(defun elpy-flymake-python-init ()
;; Make sure it's not a remote buffer as flymake would not work
(when (not (file-remote-p buffer-file-name))
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-with-folder-structure)))
(list python-check-command
(list temp-file)
;; Run flake8 from / to avoid import problems (#169)
"/"))))
;;---- from https://www.emacswiki.org/emacs/BackupDirectory
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
(message "Deleting old backup files...")
(let ((week (* 60 60 24 7))
(current (float-time (current-time))))
(dolist (file (directory-files temporary-file-directory t))
(when (and (backup-file-name-p file)
(> (- current (float-time (fifth (file-attributes file))))
week))
(message "%s" file)
(delete-file file))))
;;----
(setq create-lockfiles nil)
;;----
from pytest-watch.
Sadly, on my machine at least, it seems like the above Emacs config makes flake8 lose track of the .flake8 files in the project structure and thus which rules it should or shouldn't apply.
from pytest-watch.
for linux users as a replacement for pytest-watch you can use the entr
command which is an interface to inotify and feed it whatever files you want through fdfind / find etc.
from pytest-watch.
Also having this problem
from pytest-watch.
bump
from pytest-watch.
Also had this problem, with flycheck
specifically
from pytest-watch.
Related Issues (20)
- broken link in the README: saythanks
- How to use with poetry? HOT 3
- Run ptw with -s HOT 3
- pytest watch seems to fail when pyproject.toml is used as a config file HOT 7
- Logging error when running pytest in pytest-watch HOT 1
- Integration with pytest-cov HOT 2
- My ptw doesn't "watch" subdirectories
- Running from "python -m pytest_watch" does not add current path to PYTHONPATH HOT 1
- ignore `Client.dataset is deprecated` warnings
- Maintenance Status? HOT 4
- pytest 7.0: AttributeError: 'dict' object has no attribute 'config' HOT 3
- error:'str' object has no attribute 'plate_num'
- Specify `python_requires` in the distribution package metadata
- Runner argument not parsed correctly on windows
- Error in Python 3.10: `module 'collections' has no attribute 'MutableSet'` HOT 5
- `ImportError` when running tests using `ptw` HOT 2
- Directories passed to pytest-watch are also passed to pytest, but shouldn't be
- sdist is missing LICENSE
- When I install pytest-watch with Python 3.11 and pip 22.3.1 I see deprecation warning HOT 1
- GO TO PYTEST-WATCHER HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-watch.