pytest watch seems to fail when pyproject.toml is used as a config file
See original GitHub issueWhen pytest config is stored in pyproject.toml
:
Traceback (most recent call last):
File "/Users/maximilian/Library/Caches/pypoetry/virtualenvs/n-cyukv0jK-py3.8/bin/ptw", line 8, in <module>
sys.exit(main())
File "/Users/maximilian/Library/Caches/pypoetry/virtualenvs/n-cyukv0jK-py3.8/lib/python3.8/site-packages/pytest_watch/command.py", line 83, in main
if not merge_config(args, pytest_args, verbose=args['--verbose']):
File "/Users/maximilian/Library/Caches/pypoetry/virtualenvs/n-cyukv0jK-py3.8/lib/python3.8/site-packages/pytest_watch/config.py", line 95, in merge_config
config.read(config_path)
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/configparser.py", line 697, in read
self._read(fp, filename)
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/configparser.py", line 1113, in _read
raise e
configparser.ParsingError: Source contains parsing errors: '/Users/maximilian/workspace/n/pyproject.toml'
[line 59]: ']\n'
This works when the pytest config in pyproject.toml
is removed
Issue Analytics
- State:
- Created 3 years ago
- Reactions:36
- Comments:5
Top Results From Across the Web
Issues · joeyespo/pytest-watch - GitHub
Local continuous test runner with pytest and watchdog. ... pytest watch seems to fail when pyproject.toml is used as a config file. #114...
Read more >pytest-watch - Bountysource
pytest watch seems to fail when pyproject.toml is used as a config file $ 0 ... When pytest is wrapped by ptw, I...
Read more >All my poetry commands fail with 'The Poetry config is invalid'
A multi-line string is not valid for the description field. The error message does not match '^[^\n]*$' is telling you that it is...
Read more >pytest Documentation - Read the Docs
The first test passed and the second failed. You can easily see the intermediate values in the assertion to help you under-.
Read more >How to capture warnings — pytest documentation
The same option can be set in the pytest.ini or pyproject.toml file using the filterwarnings ini option. For example, the configuration below will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Faced the same issue and investigated my
pyproject.toml
anytime you have
I change to (note the 4 spaces)
PTW works like a charm
btw moving pytest configuration form pyproject.toml to pytest.ini did the trick but I would prefer to not have extra config files