summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGeorgy Frolov <gosha@fro.lv>2020-03-12 15:01:19 +0300
committer赖信涛 <laixintao@users.noreply.github.com>2020-03-14 10:53:43 +0800
commit61c81b05f50a073f62629bdcf8eb4317d7a2084c (patch)
treecdbb70cef765e06ff281d12b381175174a2a1253 /tests
parent0f3d4602efa2eda4cf5056d237cac36b2cc012ea (diff)
removed py2-related stuff
Diffstat (limited to 'tests')
-rw-r--r--tests/conftest.py2
-rw-r--r--tests/features/db_utils.py4
-rw-r--r--tests/features/environment.py3
-rw-r--r--tests/features/fixture_utils.py4
-rw-r--r--tests/features/steps/auto_vertical.py3
-rw-r--r--tests/features/steps/basic_commands.py2
-rw-r--r--tests/features/steps/crud_database.py3
-rw-r--r--tests/features/steps/crud_table.py2
-rw-r--r--tests/features/steps/expanded.py2
-rw-r--r--tests/features/steps/iocommands.py2
-rw-r--r--tests/features/steps/named_queries.py2
-rw-r--r--tests/features/steps/specials.py2
-rw-r--r--tests/features/steps/wrappers.py3
-rw-r--r--tests/metadata.py5
-rw-r--r--tests/test_fuzzy_completion.py1
-rw-r--r--tests/test_main.py2
-rw-r--r--tests/test_naive_completion.py1
-rw-r--r--tests/test_pgexecute.py3
-rw-r--r--tests/test_prompt_utils.py3
-rw-r--r--tests/test_smart_completion_multiple_schemata.py2
-rw-r--r--tests/test_smart_completion_public_schema_only.py2
21 files changed, 1 insertions, 52 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 315e3de8..2a715b11 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,5 +1,3 @@
-from __future__ import print_function
-
import os
import pytest
from utils import (
diff --git a/tests/features/db_utils.py b/tests/features/db_utils.py
index 7f8a2e7d..f57bc3b9 100644
--- a/tests/features/db_utils.py
+++ b/tests/features/db_utils.py
@@ -1,7 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-from __future__ import print_function
-
from psycopg2 import connect
from psycopg2.extensions import AsIs
diff --git a/tests/features/environment.py b/tests/features/environment.py
index 349e9dd6..4e7e601e 100644
--- a/tests/features/environment.py
+++ b/tests/features/environment.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals, print_function
-
import copy
import os
import sys
diff --git a/tests/features/fixture_utils.py b/tests/features/fixture_utils.py
index 25204544..16f123a6 100644
--- a/tests/features/fixture_utils.py
+++ b/tests/features/fixture_utils.py
@@ -1,7 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-from __future__ import print_function
-
import os
import codecs
diff --git a/tests/features/steps/auto_vertical.py b/tests/features/steps/auto_vertical.py
index 2bb89870..1643ea5e 100644
--- a/tests/features/steps/auto_vertical.py
+++ b/tests/features/steps/auto_vertical.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8
-from __future__ import unicode_literals, print_function
-
from textwrap import dedent
from behave import then, when
import wrappers
diff --git a/tests/features/steps/basic_commands.py b/tests/features/steps/basic_commands.py
index bda163f6..0c42ae0e 100644
--- a/tests/features/steps/basic_commands.py
+++ b/tests/features/steps/basic_commands.py
@@ -1,10 +1,8 @@
-# -*- coding: utf-8
"""
Steps for behavioral style tests are defined in this module.
Each step is defined by the string decorating it.
This string is used to call the step in "*.feature" file.
"""
-from __future__ import unicode_literals, print_function
import pexpect
import subprocess
diff --git a/tests/features/steps/crud_database.py b/tests/features/steps/crud_database.py
index 9eab4f45..3fd8b7a1 100644
--- a/tests/features/steps/crud_database.py
+++ b/tests/features/steps/crud_database.py
@@ -1,11 +1,8 @@
-# -*- coding: utf-8 -*-
"""
Steps for behavioral style tests are defined in this module.
Each step is defined by the string decorating it.
This string is used to call the step in "*.feature" file.
"""
-from __future__ import unicode_literals, print_function
-
import pexpect
from behave import when, then
diff --git a/tests/features/steps/crud_table.py b/tests/features/steps/crud_table.py
index 6d848aba..0375883a 100644
--- a/tests/features/steps/crud_table.py
+++ b/tests/features/steps/crud_table.py
@@ -1,10 +1,8 @@
-# -*- coding: utf-8
"""
Steps for behavioral style tests are defined in this module.
Each step is defined by the string decorating it.
This string is used to call the step in "*.feature" file.
"""
-from __future__ import unicode_literals, print_function
from behave import when, then
from textwrap import dedent
diff --git a/tests/features/steps/expanded.py b/tests/features/steps/expanded.py
index f79f913b..f34fcf04 100644
--- a/tests/features/steps/expanded.py
+++ b/tests/features/steps/expanded.py
@@ -1,11 +1,9 @@
-# -*- coding: utf-8
"""Steps for behavioral style tests are defined in this module.
Each step is defined by the string decorating it. This string is used
to call the step in "*.feature" file.
"""
-from __future__ import unicode_literals, print_function
from behave import when, then
from textwrap import dedent
diff --git a/tests/features/steps/iocommands.py b/tests/features/steps/iocommands.py
index 416eac59..613aeb29 100644
--- a/tests/features/steps/iocommands.py
+++ b/tests/features/steps/iocommands.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8
-from __future__ import unicode_literals, print_function
import os
import os.path
diff --git a/tests/features/steps/named_queries.py b/tests/features/steps/named_queries.py
index 289ec639..3f52859b 100644
--- a/tests/features/steps/named_queries.py
+++ b/tests/features/steps/named_queries.py
@@ -1,10 +1,8 @@
-# -*- coding: utf-8
"""
Steps for behavioral style tests are defined in this module.
Each step is defined by the string decorating it.
This string is used to call the step in "*.feature" file.
"""
-from __future__ import unicode_literals, print_function
from behave import when, then
import wrappers
diff --git a/tests/features/steps/specials.py b/tests/features/steps/specials.py
index 2c77a3b1..813292c4 100644
--- a/tests/features/steps/specials.py
+++ b/tests/features/steps/specials.py
@@ -1,10 +1,8 @@
-# -*- coding: utf-8
"""
Steps for behavioral style tests are defined in this module.
Each step is defined by the string decorating it.
This string is used to call the step in "*.feature" file.
"""
-from __future__ import unicode_literals, print_function
from behave import when, then
import wrappers
diff --git a/tests/features/steps/wrappers.py b/tests/features/steps/wrappers.py
index 9a2db982..e0f5a20e 100644
--- a/tests/features/steps/wrappers.py
+++ b/tests/features/steps/wrappers.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8
-from __future__ import unicode_literals
-
import re
import pexpect
from pgcli.main import COLOR_CODE_REGEX
diff --git a/tests/metadata.py b/tests/metadata.py
index 5cf9456d..2f89ea28 100644
--- a/tests/metadata.py
+++ b/tests/metadata.py
@@ -1,12 +1,9 @@
-from __future__ import unicode_literals
-
from functools import partial
from itertools import product
from pgcli.packages.parseutils.meta import FunctionMetadata, ForeignKey
from prompt_toolkit.completion import Completion
from prompt_toolkit.document import Document
from mock import Mock
-from six import iteritems
import pytest
parametrize = pytest.mark.parametrize
@@ -78,7 +75,7 @@ class MetaData(object):
def specials(self, pos=0):
return [
Completion(text=k, start_position=pos, display_meta=v.description)
- for k, v in iteritems(self.completer.pgspecial.commands)
+ for k, v in self.completer.pgspecial.commands.items()
]
def columns(self, tbl, parent="public", typ="tables", pos=0):
diff --git a/tests/test_fuzzy_completion.py b/tests/test_fuzzy_completion.py
index 30f9de2c..8f8f2cd0 100644
--- a/tests/test_fuzzy_completion.py
+++ b/tests/test_fuzzy_completion.py
@@ -1,4 +1,3 @@
-from __future__ import unicode_literals
import pytest
diff --git a/tests/test_main.py b/tests/test_main.py
index c55944b6..044181b1 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -1,5 +1,3 @@
-# coding=utf-8
-from __future__ import unicode_literals, print_function
import os
import platform
import mock
diff --git a/tests/test_naive_completion.py b/tests/test_naive_completion.py
index cf2824e4..7c7ed8e7 100644
--- a/tests/test_naive_completion.py
+++ b/tests/test_naive_completion.py
@@ -1,4 +1,3 @@
-from __future__ import unicode_literals
import pytest
from prompt_toolkit.completion import Completion
from prompt_toolkit.document import Document
diff --git a/tests/test_pgexecute.py b/tests/test_pgexecute.py
index 46bd735c..9273be94 100644
--- a/tests/test_pgexecute.py
+++ b/tests/test_pgexecute.py
@@ -1,6 +1,3 @@
-# coding=UTF-8
-from __future__ import print_function
-
from textwrap import dedent
import psycopg2
diff --git a/tests/test_prompt_utils.py b/tests/test_prompt_utils.py
index 4986dc57..c1f8a169 100644
--- a/tests/test_prompt_utils.py
+++ b/tests/test_prompt_utils.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-
-
import click
from pgcli.packages.prompt_utils import confirm_destructive_query
diff --git a/tests/test_smart_completion_multiple_schemata.py b/tests/test_smart_completion_multiple_schemata.py
index 9fff2a17..805b727c 100644
--- a/tests/test_smart_completion_multiple_schemata.py
+++ b/tests/test_smart_completion_multiple_schemata.py
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals, print_function
-
import itertools
from metadata import (
MetaData,
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py
index bb371543..e046978b 100644
--- a/tests/test_smart_completion_public_schema_only.py
+++ b/tests/test_smart_completion_public_schema_only.py
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals, print_function
-
from metadata import (
MetaData,
alias,