1

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?

omer mazig
  • 965
  • 2
  • 10
  • 17
  • 1
    This is probably a bug - I have seen this once, but I don't remember what I did to fix it. For sure it was no radical measure (like clearing the settings), but just something like remove / readd, or rename to something with another extension and back. You may also try `File/Invalidate Caches`. – MrBean Bremen Aug 20 '20 at 15:41

1 Answers1

3

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

Pavel Karateev
  • 7,737
  • 3
  • 32
  • 59