Comments (4)
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.
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.
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:
pytest-cpp/pytest_cpp/plugin.py
Lines 34 to 36 in 407df50
I will update the description.
Thanks for finding and reporting this!
from pytest-cpp.
1.2.1
released with this fix. 👍
from pytest-cpp.
Related Issues (20)
- Add support for Catch2 v3 HOT 12
- Catch2: escape special characters in test names HOT 1
- Google: Support expected failures HOT 11
- Type-Parametrized Gtests failure HOT 4
- marking cpp test targets. HOT 5
- Collect error when using xdist and temporary .pyc file is deleted
- Ignore python test files maybe? HOT 10
- Skipping invalid test suites HOT 3
- Verbose boost test logging to stdout HOT 6
- Add a way to use valgrind, catchsegv or similar tool HOT 2
- Add support for Catch testing framework HOT 4
- No skipped message is included in result.xml file
- Key Error after upgrade to 2.1.0 HOT 4
- Getting some warnings with pytest 7.0 HOT 2
- Incompatibility between pytest 6.x and pytest-cpp==2.1.2 HOT 2
- Error when using gtest arguments HOT 5
- Add type-checking with mypy
- Issues if a test exits before xml is created HOT 1
- Add support of prefix-ish parameter to run executable HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-cpp.