PY-22556, PY-23233, PY-23217: Set working directory for tests that are not in packages (expect pytest with py3):

* Useless code removed from PyQualifiedNameResolveContext
 * Logic extracted to PyTestRunnerUtils
 * Tests added
This commit is contained in:
Ilya.Kazakevich
2017-03-28 13:18:31 +03:00
parent 570ab3a46e
commit 21a5beb729
22 changed files with 523 additions and 196 deletions
@@ -0,0 +1,3 @@
# coding=utf-8
def smart_func():
return 42
@@ -0,0 +1,9 @@
from unittest import TestCase
from logic import smart_func
from tests_package.test_tools import ANSWER
class TestLonely(TestCase):
def test_test(self):
self.assertEqual(ANSWER, smart_func())
@@ -0,0 +1,9 @@
from unittest import TestCase
from logic import smart_func
from tests_package.test_tools import ANSWER
class TestLogic(TestCase):
def test_test(self):
self.assertEqual(ANSWER, smart_func())
@@ -0,0 +1 @@
ANSWER = 42