Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Drop tests._compat module entirely
  • Loading branch information
filmor committed Jun 19, 2020
commit cc4211c27af7bf79f8f457f2430b8688ac03c52e
15 changes: 0 additions & 15 deletions src/tests/_compat.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/tests/stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import threading
import time

from ._compat import thread
import _thread as thread
from .utils import dprint


Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import System
import pytest

from ._compat import DictProxyType
from .utils import DictProxyType


def test_basic_reference_type():
Expand Down
3 changes: 1 addition & 2 deletions src/tests/test_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import pytest
from Python.Test import DelegateTest, StringDelegate

from ._compat import DictProxyType
from .utils import HelloClass, hello_func, MultipleHandler
from .utils import HelloClass, hello_func, MultipleHandler, DictProxyType


def test_delegate_standard_attrs():
Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
import Python.Test as Test

from ._compat import DictProxyType
from .utils import DictProxyType


def test_enum_standard_attrs():
Expand Down
1 change: 0 additions & 1 deletion src/tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ def test_python_compat_of_managed_exceptions():

e = OverflowException(msg)
assert str(e) == msg
assert str(e) == msg

assert e.args == (msg,)
assert isinstance(e.args, tuple)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import Python.Test as Test
import pytest

from ._compat import DictProxyType
from .utils import DictProxyType


def test_interface_standard_attrs():
Expand Down
9 changes: 3 additions & 6 deletions src/tests/test_sysargv.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-

"""Test sys.argv state."""

import sys

from ._compat import check_output
from subprocess import check_output


def test_sys_argv_state(filepath):
Expand All @@ -14,5 +11,5 @@ def test_sys_argv_state(filepath):

script = filepath("argv-fixture.py")
out = check_output([sys.executable, script, "foo", "bar"])
assert "foo" in out
assert "bar" in out
assert b"foo" in out
assert b"bar" in out
2 changes: 1 addition & 1 deletion src/tests/test_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import threading
import time

from ._compat import thread
import _thread as thread
from .utils import dprint


Expand Down
1 change: 0 additions & 1 deletion src/tests/tests.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="__init__.py" />
<Compile Include="_compat.py" />
<Compile Include="_missing_import.py" />
<Compile Include="leaktest.py" />
<Compile Include="profile.py" />
Expand Down
3 changes: 2 additions & 1 deletion src/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Refactor utility functions and classes
"""

from __future__ import print_function
DictProxyType = type(object.__dict__)


def dprint(msg):
# Debugging helper to trace thread-related tests.
Expand Down