Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve coverage on edge cases + misc. testing #127

Merged
merged 11 commits into from
Jul 25, 2018
Merged

Conversation

nbgl
Copy link
Contributor

@nbgl nbgl commented Jul 23, 2018

  • Improve test coverage on edge cases.
  • Minor changes to code to make those tests pass, including slight changes to exception throwing.
  • revert test_similarity.py to previous, so we still test the old Dice coefficient API
  • rename tests for my Dice and Hamming similarities to test_similarity_hamming.py and test_similarity_dice.py respectively
  • switch some tests from unittest to pytest

@nbgl nbgl added the testing label Jul 23, 2018
@nbgl nbgl self-assigned this Jul 23, 2018
@nbgl
Copy link
Contributor Author

nbgl commented Jul 23, 2018

Tests are failing because of a bug that exists in develop. The fix is in the branch fix-zero-popcount. I am waiting for #126 to be reviewed and merged before I can make that pull request.

@@ -1,15 +1,14 @@

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole file was reverted to the pre-multiparty version. This is so the PR I make later is strictly additive and we can check that it doesn’t break anything.

The only change I made from the pre-multiparty version is fixing the interaction with Clkhash so it uses the newer API.

@@ -0,0 +1,253 @@
import unittest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is mostly the same as test_similarity.py, but it uses the new API instead of the old API.

@@ -3,10 +3,13 @@
import random
import unittest

import bitarray
import pytest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to adding tests, I also modified this file to use Pytest instead of Unittest.

Jakub Nabaglo added 2 commits July 24, 2018 10:20
Copy link
Collaborator

@hardbyte hardbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid addition/refactoring of anonlink's testing 🏅

@nbgl nbgl merged commit 21fb3c5 into api-new Jul 25, 2018
@nbgl nbgl deleted the api-new-test-edge-cases branch July 25, 2018 00:17
nbgl added a commit that referenced this pull request Aug 1, 2018
* Blocking functions

* Minor docstring

* Types for Mypy

* Hamming similarity

* Refactor tests

* Minor refactor

* Require NumPy

* Multiparty greedy solver

* Candidate generation. Still missing some features

* Some optimisations

* More optimisation

* Still optimising

* Ready for PR

* Hamish PR comments

* Fix Python 3.5 bug

* Serialization

* Serialisation of candidate pairs!

* Update typechecking.

* Fix typing

* Fix tests on big numbers

* Oops. Minor.

* Minor comment

* Brian PR comments

* Bug fix + more Pythonic type checking

* Only test on >=Python3.6

* Travis does not yet have Python 3.7...

* GPU 1 does not yet have Python 3.7

* Hamish PR comments

* Revert release to Python 3.6

* I forgot to commit this before merging… (#119)

* Candidate generation refactor (#122)

* Candidate generation

* Minor docstring

* Typo in docstring

* Hamish PR Comments

* New API for Dice Coefficient (#121)

* New API for Dice Coefficient

* Docstrings

* Minor PEP8

* Typing

* Make tests pass…

* Brian PR comments

* Mypy typing + make API nice and unified (#123)

* Type hints

* Bring Hamming similarity in line with rest of API

* Make solver tests pass

* Ok, solving tests should finally work now...

* Brian PR comments

* Make typechecking.Record importable

* Add dependency on mypy extensions

* Blocking style (#125)

* Blocking style

* Minor commenting

* Improve coverage on edge cases + misc. testing (#127)

* Type hints

* Bring Hamming similarity in line with rest of API

* Make solver tests pass

* Ok, solving tests should finally work now...

* Edge cases and tests

* Restore old similarity tests

* Minor: I don't know how that typo got there

* Make Dice similarity tests pass with new Clkhash

* Minor: unused imports

* Style and docstrings (#130)

* Style and comments

* More style and comments

* Mypy

* Minor: Fix link

* Brian PR comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants