Skip to content

Commit

Permalink
Merge pull request #65 from abadger/switch-to-six
Browse files Browse the repository at this point in the history
Switch to six
  • Loading branch information
wearpants committed Oct 20, 2017
2 parents a2cc064 + 374f683 commit 091275c
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 673 deletions.
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -20,6 +20,7 @@
author_email='pete@wearpants.org',
url='http://twiggy.wearpants.org',
packages=['twiggy', 'twiggy.lib', 'twiggy.features'],
install_requires=['six'],
license = "BSD",
classifiers = [
"Topic :: System :: Logging",
Expand Down
8 changes: 6 additions & 2 deletions tests/test_integration.py
@@ -1,17 +1,21 @@
from __future__ import print_function

import sys
import time
if sys.version_info >= (2, 7):
import unittest
else:
try:
import unittest2 as unittest
except ImportError:
raise RuntimeError("unittest2 is required for Python < 2.7")

from six import StringIO

import twiggy
import time

from . import when
from twiggy.compat import StringIO


def fake_gmtime():
return when
Expand Down
7 changes: 4 additions & 3 deletions tests/test_logger.py
Expand Up @@ -7,11 +7,12 @@
import unittest2 as unittest
except ImportError:
raise RuntimeError("unittest2 is required for Python < 2.7")
import sys

from twiggy import logger, outputs, levels, filters
from twiggy.compat import StringIO
from six import StringIO

import twiggy as _twiggy
from twiggy import logger, outputs, levels, filters


class LoggerTestBase(object):
"""common tests for loggers"""
Expand Down
8 changes: 5 additions & 3 deletions tests/test_outputs.py
@@ -1,19 +1,21 @@
import os
import sys
import tempfile
if sys.version_info >= (2, 7):
import unittest
else:
try:
import unittest2 as unittest
except ImportError:
raise RuntimeError("unittest2 is required for Python < 2.7")
import tempfile
import os

from six import StringIO

from twiggy import outputs, formats
from twiggy.compat import StringIO

from . import make_mesg, when


m = make_mesg()

# just stuff time in fields so we can use an existing format object
Expand Down

0 comments on commit 091275c

Please sign in to comment.