Ejemplo n.º 1
0
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.


import os
import socket

from unittest import skipIf

from twisted.trial.unittest import SynchronousTestCase, TestCase
from twisted.internet.address import IPv4Address, UNIXAddress, IPv6Address
from twisted.internet.address import HostnameAddress
from twisted.python.compat import nativeString
from twisted.python.runtime import platform

symlinkSkip = not platform._supportsSymlinks()

try:
    socket.AF_UNIX
except AttributeError:
    unixSkip = True
else:
    unixSkip = False


class AddressTestCaseMixin:
    def test_addressComparison(self):
        """
        Two different address instances, sharing the same properties are
        considered equal by C{==} and not considered not equal by C{!=}.
Ejemplo n.º 2
0
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

from __future__ import division, absolute_import

import re
import os
import socket

from twisted.trial import unittest
from twisted.internet.address import IPv4Address, UNIXAddress, IPv6Address
from twisted.internet.address import HostnameAddress
from twisted.python.compat import nativeString
from twisted.python.runtime import platform

if not platform._supportsSymlinks():
    symlinkSkip = "Platform does not support symlinks"
else:
    symlinkSkip = None

try:
    socket.AF_UNIX
except AttributeError:
    unixSkip = "Platform doesn't support UNIX sockets."
else:
    unixSkip = None


class AddressTestCaseMixin(object):
    def test_addressComparison(self):
        """
Ejemplo n.º 3
0
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

from __future__ import division, absolute_import

import re
import os
import socket

from twisted.trial import unittest
from twisted.internet.address import IPv4Address, UNIXAddress, IPv6Address
from twisted.internet.address import HostnameAddress
from twisted.python.compat import nativeString
from twisted.python.runtime import platform

if not platform._supportsSymlinks():
    symlinkSkip = "Platform does not support symlinks"
else:
    symlinkSkip = None

try:
    socket.AF_UNIX
except AttributeError:
    unixSkip = "Platform doesn't support UNIX sockets."
else:
    unixSkip = None


class AddressTestCaseMixin(object):
    def test_addressComparison(self):
        """