Commit 1e4a4178 authored by Julien Muchembled's avatar Julien Muchembled

Remove some useless unit tests

Many "unit" tests (!= "threaded" tests) don't do more than checking
implementation details, and increase coverage artificially. As with testEvent
in commit 71e30fb9, most of these tests will
either be removed or rewritten as threaded tests.

The fact that the remaining unit tests actually cover code that other test
don't gives motivation to maintain them. It will be also less code to update
when switching to https://pypi.python.org/pypi/mock

I proceeded as follows:

1. Measure coverage for all tests except unit tests. While checking my work,
   I found that coverage stats for threaded/functional/zodb tests are quite
   unstable, so I restarted from the beginning by doing this measure several
   times and only keeping the intersection of coverage data.

2. Measure coverage individually for each 'unit' tests, and substract the
   each result with the data in 1.

3. The candidates for deletion are those without any code covered.

Tests I didn't delete:

- neo.tests.master.testElectionHandler: I always do minimal changes about
  election, as long as there's no serious review.

- neo.tests.master.testMasterPT.MasterPartitionTableTests.test_13_outdate

- 4 tests in neo.tests.testPT:
  test_01_Cell, test_04_removeCell, test_06_clear, test_08_filled

- neo.tests.storage.testStorage{MySQL,SQLite}

- neo.tests.testUtil.UtilTests.testReadBufferRead

In a way, this commit is actually quite conservative. There are still many
useless tests that only check error paths and for simple tested methods, this
is just duplicating thie tested code.
parent ed693968
Pipeline #3997 skipped