omer mazig
omer mazig

Reputation: 1063

IDE doesn't recognize conftest.py as a python file

I have a python project with tests and a conftest file, and a few days ago - out of nowhere - Pycharm decided that it's not a python script:

enter image description here

The result is that I can't debug it, can't jump to source, don't have inspection and ext'.

Moreover - If I change the name to something different, all of the sudden it's a python script again:

enter image description here

Why is this happening? Can anyone tell? I searched the settings for mentions of conftest and found nothing. How do I fix this?

Upvotes: 1

Views: 539

Answers (1)

Pavel Karateev
Pavel Karateev

Reputation: 8550

conftest.py has a wrong file type assigned to it, check Settings | Editor | File Types | Text and remove conftest.py from "File Name Patterns".

enter image description here

Upvotes: 3

Related Questions