Code Monkey home page Code Monkey logo

Comments (4)

nicoddemus avatar nicoddemus commented on May 30, 2024

Hi @1fabrism!

Hmmm weird. It should be able to run normal python test files alongside C++ test files without a problem.

You have both generator_demo_test.py and generator_demo_test.exe in the same directory, perhaps that might be the problem? Can you rename generator_demo_test.exe to something else (say my_demo_test.exe) and see if that makes a difference?

Also, any ideas about those warnings?

You can ignore those, I need to make a new pytest-cpp release to make it compatible with pytest>=5.4. 👍

from pytest-cpp.

1fabrism avatar 1fabrism commented on May 30, 2024

Hi @nicoddemus, thanks for the help!

I tried renaming generator_demo_test.exe to my_generator_demo.exe but it made no difference. I also tried moving the .exe file to a child folder but that made no difference either.
What did make a difference was renaming the exe to test_demo.exe. After doing that and running again py.test --collect-only it found everything, even with the .exe file still inside the child folder:

collected 4 items
<Module generator_demo_test.py>
  <Function test_vout>
  <Function test_samples>
<CppFile captured_signals/test_demo.exe>
  <CppItem Addition_TEST_SUITE.AdderTest_SIMPLE>
  <CppItem Addition_TEST_SUITE.AdderTest_COMPLEX>

So I guess there is somewhere a setting for what pytest-cpp is looking for (indeed as mentioned in the ReadMe), however I'm still not sure where that file is...

from pytest-cpp.

nicoddemus avatar nicoddemus commented on May 30, 2024

Ahh OK I see what's happening.

The default masks are test_* and *_test.

*_test won't match generator_demo_test.exe on Windows because of the .exe extension, but test_* will, because * will match the extension.

On Windows we probably should add .exe explicitly to the masks here:

for pat in masks:
if path.fnmatch(pat):
break

I will update the description.

Thanks for finding and reporting this!

from pytest-cpp.

nicoddemus avatar nicoddemus commented on May 30, 2024

1.2.1 released with this fix. 👍

from pytest-cpp.

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.