It has a different icon and is shown with Text
and Data
tabs in the bottom. It seems somehow related to its name: test_events.py
. Only if I name it this way, PyCharm exhibits this behavior. Using text_eventz.py
is OK. How do I fix it?
Asked
Active
Viewed 92 times
3

Schultz9999
- 8,717
- 8
- 48
- 87
-
2Ugh, this might be one of those weird bugs that I run into with IntelliJ every now and then. Did you create the file, then rename the file with a .py extension? – Makoto Apr 14 '15 at 23:12
-
I might have started that way... – Schultz9999 Apr 14 '15 at 23:13
-
Create a new file called `test_something.py`, something like that. Then create one called `text_something.py`. If it still does the same thing with the "test" file, it could have something to do with a unittest plugin. Some unittest modules specifically look for files starting with "test". – paidhima Apr 14 '15 at 23:17
-
@paidhima any name but test_events.py works as expected. – Schultz9999 Apr 14 '15 at 23:28
-
Let's see if it can be recreated. Create a file called "test_foo", then rename it to "test_foo.py", and see if it exhibits the same behavior as "test_events.py". – Makoto Apr 14 '15 at 23:30
1 Answers
2
Please check Settings | Editor | File Types | Text | Registered patterns. This file name may have gotten mapped to the "Plain text" file type; if you remove the erroneous mapping, everything will start working correctly.
(This is a bug in PyCharm, but unfortunately we don't know the exact steps to reproduce it.)

yole
- 92,896
- 20
- 260
- 197
-
http://stackoverflow.com/questions/13374533/pycharm-utils-py-not-getting-syntax-highlight – Schultz9999 May 06 '15 at 07:49