Giter Site home page Giter Site logo

Comments (3)

la10736 avatar la10736 commented on September 5, 2024

What do you mean with code action? Are you speaking about something like gutter icon on vscode or other IDE feature?

from rstest.

LuisOsta avatar LuisOsta commented on September 5, 2024

@la10736 I mean the code actions provided by the rust-analyzer vscode extension. It just seemed curious to me that it didn't work for async tests and thought it was an issue with rstest. As it didn't display the case by case and thought that the issue was with what the rstest macro handled the async test cases:

I've attached a photo of what it looks like normally vs async:

Normal
Screen Shot 2022-07-13 at 9 21 09 AM

Async
Screen Shot 2022-07-13 at 9 21 09 AM

Both tests are structured in the exact same way. The only difference is the usage of async testing as described here - https://docs.rs/rstest/latest/rstest/attr.rstest.html#async

from rstest.

la10736 avatar la10736 commented on September 5, 2024

Hi, you posted the same image twice :)

Anyway, that is (eventually) a rust-analyzer vscode extension's bug. I've already looked on a closed topic #120.

I guess that vscode just looking for #[test] attribute but for async tests we use #[async_std::test] attribute instead. I think that the best approach is to search an attribute where the last path segment is test but that is a vscode's chose ... not mine.

from rstest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.