Ignore:
Timestamp:
Jul 27, 2016, 10:54:56 PM (3 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_sync.py

    r1660 r1663  
    1010import os
    1111import shutil
    12 import unittest
    1312
    1413import ftputil
     
    2019
    2120
    22 class TestLocalToLocal(unittest.TestCase):
     21class TestLocalToLocal(object):
    2322
    24     def setUp(self):
     23    def setup_method(self, method):
    2524        if not os.path.exists("test_empty"):
    2625            os.mkdir("test_empty")
     
    117116
    118117
    119 class TestUploadFromWindows(unittest.TestCase):
     118class TestUploadFromWindows(object):
    120119
    121120    def test_no_mixed_separators(self):
Note: See TracChangeset for help on using the changeset viewer.