ERROR: not found, no name {test} in any of [], with proper name syntax
See original GitHub issueI copied the example test into a directory, and named it test_basic.tavern.yaml
:
---
# Every test file has one or more tests...
test_name: Get some fake data from the JSON placeholder API
# ...and each test has one or more stages (e.g. an HTTP request)
stages:
- name: Make sure we have the right ID
# Define the request to be made...
request:
url: https://jsonplaceholder.typicode.com/posts/1
method: GET
# ...and the expected response code and body
response:
status_code: 200
body:
id: 1
Then on the commandline, running tavern-ci test_basic.tavern.yaml
results in a successful test:
But running any of pytest test_basic.tavern.yaml
, python3 -m pytest test_basic.tavern.yaml
, etc results in:
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
pytest cannot import module while python can - Stack Overflow
I googled and stack-overflowed the 'ImportError: cannot import' error for PyTest, but the hits I got were related to missing python path and ......
Read more >How to correct a #NAME? error - Microsoft Support
Important: The #NAME? error signifies that something needs to be corrected in the syntax, so when you see the error in your formula,...
Read more >8. Errors and Exceptions — Python 3.11.1 documentation
Errors detected during execution are called exceptions and are not ... An except clause may name multiple exceptions as a parenthesized tuple, for...
Read more >API Reference — pytest documentation
Return a directory path object with the given name. If the directory does not yet exist, it will be created. You can use...
Read more >Error Messages | Cypress Documentation
Test File Errors No tests found This message means that Cypress was unable ... We could not determine a unique CI build ID;...
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 Free
Top 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
Solved by downgrading pytest to 3.6.0 and naming all the test files to test_*.tavern.yaml
I can’t reproduce this and I think it’s an environment-specific problem, so I’m closing this issue