Can't run Temporary Run/Debug Configurations (Ctrl+Shift+F10) one method anymore

In PyCharm 129.19 Ctrl+Shift+F10 can't run only one test method. Here's what I do:

from unittest import TestCase
class TestMyApp(TestCase):
    def test_mytest1(self):
    def test_mytest2(self):

Click on test_mytest1, press Ctrl+Shift+F10.  Temp configuration is created for the script, i.e. it runs both tests.
I remember older PyCharm versions were able to create "method" configs automatically.
Is it a bug in PyCharm or I do something wrong? If latter I'd appreciate some help.

Integrated tools / Default Test Runner: Unittests
Comment actions Permalink
Hi Dmitriy,

in the first place, PyCharm tries to find already created configuration for the file.
Please, try to remove created temporary Run configurations for this file and repeat Ctrl+Shift+F10 .
Comment actions Permalink
Tried it, didn't help.  
I've spent some time playing with it. I've reproduced the problem with simple example, seems to fail due to the error in the 2nd test, but why the 2nd test is being run if I'm trying asking to run only the 1st?

Set cursor at the end of "def test_test1(self):" line, click Ctrl+Shift+F10

import socket
from unittest import TestCase

class TestSanbox(TestCase):
    def test_test1(self):
        print 1

    def test_test2(self):
        ip = ""
        port = 53

        # reserve ip:port
        udp_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        udp_sock.bind((ip, port))

Left window:
!Test Results

Right Window:
C:\work\Python27\python.exe "C:\Program Files (x86)\JetBrains\PyCharm 125.45\helpers\pycharm\" true
Testing started at 4:00 PM ...

Traceback (most recent call last):
  File "C:/work/", line 14, in test_test2
    udp_sock.bind((ip, port))
  File "C:\work\Python27\lib\", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted

Process finished with exit code 0
Comment actions Permalink
Hm, I've started new project with that example and it did work in 129.258 as expected.
but I still see the issue with my production code.  I'll try to find a better example.

Please sign in to leave a comment.