1
0
forked from VimPlug/jedi

Remove __future__ usages

This commit is contained in:
Dave Halter
2020-07-02 03:15:07 +02:00
parent 155a1dd3fc
commit ef96c4c66b
9 changed files with 0 additions and 46 deletions

View File

@@ -1,14 +0,0 @@
"""
This is a module that imports the *standard library* unittest,
despite there being a local "unittest" module. It specifies that it
wants the stdlib one with the ``absolute_import`` __future__ import.
The twisted equivalent of this module is ``twisted.trial._synctest``.
"""
from __future__ import absolute_import
import unittest
class Assertions(unittest.TestCase):
pass

View File

@@ -1,14 +0,0 @@
"""
This is a module that shadows a builtin (intentionally).
It imports a local module, which in turn imports stdlib unittest (the
name shadowed by this module). If that is properly resolved, there's
no problem. However, if jedi doesn't understand absolute_imports, it
will get this module again, causing infinite recursion.
"""
from local_module import Assertions
class TestCase(Assertions):
def test(self):
self.assertT

View File

@@ -4,7 +4,6 @@ Refactoring tests work a little bit similar to integration tests. But the idea
is here to compare two versions of code. If you want to add a new test case,
just look at the existing ones in the ``test/refactor`` folder and copy them.
"""
from __future__ import with_statement
import os
import platform
import re

View File

@@ -1,12 +0,0 @@
"""
Tests ``from __future__ import absolute_import`` (only important for
Python 2.X)
"""
from jedi import Project
from .. import helpers
def test_can_complete_when_shadowing(Script):
path = helpers.get_example_dir('absolute_import', 'unittest.py')
script = Script(path=path, project=Project(helpers.get_example_dir('absolute_import')))
assert script.complete()