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.

Check and not assume pytest naming convention

See original GitHub issue

As an extension to #4 , I would also suggest to get the correct pytest naming conventions (pytest_classes , pytest_function and pytest_files) and check with the correct name instead of assuming test

Pytest check should be accessible from the fixture - https://docs.pytest.org/en/latest/reference.html#pytestconfig

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
MisterRioscommented, Jul 2, 2018

It works! Thank you! I’ll try and finish up tonight.

On Mon 2. Jul 2018 at 09:05, Mr. Daniel A Rios misterrios@gmail.com wrote:

Hi @anapaulagomes, I was working on it and hit a roadblock because of the test_*.py settings hardwired into the parser.

I think the config that you mention here does not return the default, but my memory is fuzzy.

I’ll take another look tonight and get back to you tomorrow.

On Sun 1. Jul 2018 at 12:14, Ana Paula Gomes notifications@github.com wrote:

Hi @MisterRios https://github.com/MisterRios ! Are you still working on it? I saw that’s possible to check the used file convention using config._getini(‘python_files’). Let me know if you need some help or if this issue is available for someone else.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/anapaulagomes/pytest-picked/issues/5#issuecomment-401597276, or mute the thread https://github.com/notifications/unsubscribe-auth/AEeB1HuWNBxxyic5FyFNNvaQMa_HgM2rks5uCKEPgaJpZM4UPUsF .

1reaction
MisterRioscommented, May 27, 2018

I agree.

Is there a way to assign the ticket to myself? Or can one of you do it for me? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pytest - a beginner guide. - Numpy Ninja
Naming conventions of pytest -. Pytest file should start with either test_filename or filename_test. Naming convention for all functions ...
Read more >
pytest conforms to naming convention but not collecting tests ...
Whenever I try to run pytest test_clientLogin.py , it results in collecting 0 items and no tests ran despite my module and method...
Read more >
Test method collection does not follow documentation's ...
pytest : 6.1.2 python: 3.6.8 The documentation indicates that naming must follow: Test method names or function names should start with ...
Read more >
pytest fixtures: explicit, modular, scalable
fixtures are implemented in a modular manner, as each fixture name triggers a fixture ... You can think of a test as being...
Read more >
Chapter02 Testing Conventions - Pragmatic AI Labs
Test runners like pytest benefit from these conventions for automatic ... Do not use the singular test directory name because it overrides Python's...
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