forked from VimPlug/jedi
Fix test failure in Python 3.3
There is a new method introduced in Python 3.3: http://docs.python.org/3/library/datetime.html#datetime.datetime.timestamp
This commit is contained in:
@@ -14,7 +14,7 @@ import textwrap
|
|||||||
from .base import TestBase, unittest, cwd_at
|
from .base import TestBase, unittest, cwd_at
|
||||||
|
|
||||||
import jedi
|
import jedi
|
||||||
from jedi._compatibility import utf8, unicode
|
from jedi._compatibility import utf8, unicode, is_py33
|
||||||
from jedi import api
|
from jedi import api
|
||||||
api_classes = api.api_classes
|
api_classes = api.api_classes
|
||||||
|
|
||||||
@@ -569,9 +569,12 @@ class TestInterpreterAPI(unittest.TestCase):
|
|||||||
def test_complete_raw_instance(self):
|
def test_complete_raw_instance(self):
|
||||||
import datetime
|
import datetime
|
||||||
dt = datetime.datetime(2013, 1, 1)
|
dt = datetime.datetime(2013, 1, 1)
|
||||||
|
completions = ['time', 'timetz', 'timetuple']
|
||||||
|
if is_py33:
|
||||||
|
completions += ['timestamp']
|
||||||
self.check_interpreter_complete('(dt - dt).ti',
|
self.check_interpreter_complete('(dt - dt).ti',
|
||||||
locals(),
|
locals(),
|
||||||
['time', 'timetz', 'timetuple'])
|
completions)
|
||||||
|
|
||||||
|
|
||||||
def test_settings_module():
|
def test_settings_module():
|
||||||
|
|||||||
Reference in New Issue
Block a user