mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
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
|
||||
|
||||
import jedi
|
||||
from jedi._compatibility import utf8, unicode
|
||||
from jedi._compatibility import utf8, unicode, is_py33
|
||||
from jedi import api
|
||||
api_classes = api.api_classes
|
||||
|
||||
@@ -569,9 +569,12 @@ class TestInterpreterAPI(unittest.TestCase):
|
||||
def test_complete_raw_instance(self):
|
||||
import datetime
|
||||
dt = datetime.datetime(2013, 1, 1)
|
||||
completions = ['time', 'timetz', 'timetuple']
|
||||
if is_py33:
|
||||
completions += ['timestamp']
|
||||
self.check_interpreter_complete('(dt - dt).ti',
|
||||
locals(),
|
||||
['time', 'timetz', 'timetuple'])
|
||||
completions)
|
||||
|
||||
|
||||
def test_settings_module():
|
||||
|
||||
Reference in New Issue
Block a user