summaryrefslogtreecommitdiff
path: root/python/testSrc/com/jetbrains/env/python/testing/PythonPyTestingTest.java
blob: ab3dee60c5b0cad40b31816c34236a7de040c68d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.jetbrains.env.python.testing;

import com.jetbrains.env.PyEnvTestCase;
import com.jetbrains.env.ut.PyTestTestTask;

/**
 * User : catherine
 */
public class PythonPyTestingTest extends PyEnvTestCase{
  public void testPytestRunner() {
    runPythonTest(new PyTestTestTask("/testRunner/env/pytest", "test1.py") {

      @Override
      public void after() {
        assertEquals(3, allTestsCount());
        assertEquals(3, passedTestsCount());
        allTestsPassed();
      }
    });
  }

  public void testPytestRunner2() {
    runPythonTest(new PyTestTestTask("/testRunner/env/pytest", "test2.py") {

      @Override
      public void after() {
        assertEquals(8, allTestsCount());
        assertEquals(5, passedTestsCount());
        assertEquals(3, failedTestsCount());
      }
    });
  }
}