Pycharm - no tests found?

I get

No tests found

The error is in Pycharm, and I can’t understand why I get it ... this is what I have for mine point_test.py:

import unittest
import sys
import os

sys.path.insert(0, os.path.abspath('..'))

from ..point import Point


class TestPoint(unittest.TestCase):
    def setUp(self):
        pass

    def xyCheck(self,x,y):
        point = Point(x,y)
        self.assertEqual(x,point.x)
        self.assertEqual(y,point.y)

and point.pywhat I'm trying to check:

import unittest

from .utils import check_coincident, shift_point

class Point(object):
    def __init__(self,x,y,mark={}):
        self.x = x
        self.y = y
        self.mark = mark

    def patched_coincident(self,point2):
        point1 = (self.x,self.y)
        return check_coincident(point1,point2)

    def patched_shift(self,x_shift,y_shift):
        point = (self.x,self.y)
        self.x,self,y = shift_point(point,x_shift,y_shift)

Is this something wrong with my startup configuration? I looked at this one , but I'm still completely confused. My launch configuration currently looks like this:

enter image description here

Think I just understand what I can do wrong? Any help would be greatly appreciated, thanks!

+4
source share
6 answers

, test_ xyCheck test_xyCheck:)

+12

, , , , .

, PyCharm ( Intellij Idea Python) , , .

  • "" ( )
  • , , "". "" ( T

Intellij IDEA 2016.3.5 Python

python -m unittest

__init__.py . Python - , "", , "", , "t" . TestCase test_case .

+11

, , - "## , -k XXXX". , Run/Debug, Pycharm , .

+2

( "-" ) . . project-tests.py project_tests.py .

+2

, - . (). Django tests.py . "", . Pycharm . , tests.py .

:

  • , tests.py ( )
  • , tests , Pycharm, , .

, :

enter image description here

+1

, .

test_queue.py, , , "Run UnitTests" PyCharm, , .

, unit test , test_queue.py, - .

, , unit test, , .

So, one more thing to check, make sure that there are no other files in your project with the same name.

+1
source

All Articles