question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR: not found, no name {test} in any of [], with proper name syntax

See original GitHub issue

I 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:

image

But running any of pytest test_basic.tavern.yaml, python3 -m pytest test_basic.tavern.yaml, etc results in:

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
borkfestcommented, Sep 4, 2019

Solved by downgrading pytest to 3.6.0 and naming all the test files to test_*.tavern.yaml

0reactions
michaelboultoncommented, May 1, 2020

I can’t reproduce this and I think it’s an environment-specific problem, so I’m closing this issue

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found