Closed illright closed 5 years ago
I chose not to rewrite certain tests (except test_nested_dict
) in test_dict_struct.py
because I find them irrelevant. I'd like your permission to remove those tests.
I find them irrelevant because they mostly test the lists, for which there's a file of its own.
The same goes for some tests in test_list_struct.py
. I'd like to get rid of them.
Done, please tell me if the tests I mentioned above can be deleted. After that we can consider the work done, I think.
Wow @illright!
You've written an absolutely fantastic test suite! Thank you so much.
You appear very competent, so I went ahead and gave you commit permissions (accept on mail). Please know that this is not an obligation in any way and that even a single minute of your time always will be appreciated.
tests/test_str.py
. Maybe the error can use a more general strategy, so its not just integers?Remove the irrelevant tests. It does seem relevant to test for nested stuff still though.
Again, thanks for your interest in the project - your changes has been merged!
@carlbordum You see, with the printer tests we do something like this:
assert pformat(dct) == '{a: int, b: str}'
In Python 3.5 and less it is not guaranteed that the order of keys will be the same, so this validation will fail because of this:
assert '{b: str, a: int}' == '{a: int, b: str}'
, which is obviously False
, but that doesn't mean that the printer failed to do its job.
Because of that, I'd leave out Python 3.5 in tests, it's not like it makes a huge difference in the sense of test coverage.
As for the other things, I've addressed them in the recent commits to master.
This pull request will improve the tests' quality by using the
hypothesis
library.Progress:
_test_printer
test_customtype
test_dict_struct
test_list_struct
test_str
test_structure_check
test_tuple_struct
Fixes #13