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_file_transfer.py

    r1660 r1663  
    77import io
    88import random
    9 import unittest
    109
    1110import pytest
     
    3029
    3130
    32 class TestTimestampComparison(unittest.TestCase):
     31class TestTimestampComparison(object):
    3332
    3433    def test_source_is_newer_than_target(self):
     
    8584
    8685
    87 class TestChunkwiseTransfer(unittest.TestCase):
     86class TestChunkwiseTransfer(object):
    8887
    8988    def _random_string(self, count):
Note: See TracChangeset for help on using the changeset viewer.