How To Change Pycharms Default Testing Skeleton From Unittest Format to Pytest?
Question: I'm trying to change from Unittest to PyTests. After changing the default test
runner from Unittests to py.test under Python integration Tools I'm still
getting the Unittest skeleton when creating a new test:

Instead of this:

    
    
    from unittest import TestCase
    
    class Test<selected function>(TestCase):
        pass
    

I want it to be this:

    
    
    import pytest
    
    class Test< selected function >:
        def test_<selected function>:
        pass
    

I tried changing the Python Unit Test Code Template under
Preferences>Editor>File and Code templates.

No luck. Where do I change the default testing template?


Answer: In my case, the best solution I came up with was creating a new template. I
called it `Python Test` and the template is as follows.

    
    
    # -*- coding: utf-8 -*-
    from __future__ import absolute_import, unicode_literals
    
    import pytest
    
    
    def test():
        pass
    

This speeds up enough my test creation. At some point they will probably add
the testing functionality.

