Ignore:
Timestamp:
Jul 27, 2016, 10:54:56 PM (4 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Remove `unittest` dependency

- Remove `unittest` imports

- Let test case classes inherit from `object` instead of
  `unittest.TestCase`

- Use `setup_method` and `teardown_method` instead of
  `unittest`'s `setUp` and `tearDown`

- Use `pytest.mark.skipif` instead of `unittest.skipIf`

- Use `pytest.mark.slow_test` instead of decorator in
  `test/__init__.py`. Exclude slow tests with

    py.test -m "not slow_test" test

- Replace some leftover `assert*` calls with `assert`
  statements

- Replace `assert False, ...` with `pytest.fail`

ticket: 98
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test_tool.py

    r1660 r1663  
    55from __future__ import unicode_literals
    66
    7 import unittest
    8 
    97import ftputil.compat as compat
    108import ftputil.tool
    119
    1210
    13 class TestSameStringTypeAs(unittest.TestCase):
     11class TestSameStringTypeAs(object):
    1412
    1513    # The first check for equality is enough for Python 3, where
     
    3836
    3937
    40 class TestSimpleConversions(unittest.TestCase):
     38class TestSimpleConversions(object):
    4139
    4240    def test_as_bytes(self):
     
    5755
    5856
    59 class TestEncodeIfUnicode(unittest.TestCase):
     57class TestEncodeIfUnicode(object):
    6058
    6159    def test_do_encode(self):
Note: See TracChangeset for help on using the changeset viewer.