Ah, a fine Spec. Has been a while since I've used Hspec, but your tests seem reasonable. So, first of all: well done!
There is one bit we should fix though, and you have identified it yourself: the property tests.
Creating any kind of number and then checking whether it's positive is a hassle, as half the numbers will get discarded per ...
Not familiar with CAN yet so just one suggestion:
Get rid of those print statements, use the logging module instead. See also here: Basic Logging Tutorial and here: Logging Cookbook
being able to write to multiple destinations: console + text files in different formats if desired
increase or reduce verbosity at will
keep a permanent record of ...
In-band error signalling
# reports false if message fails to be received
is problematic. You're forcing the caller of this code to understand that the return value has at least two different types: boolean or whatever "signal data" is.
The Python way to approach this is to use exceptions. Rather than (say) re-...
Underscore is used to mark a variable protected in python classes
_counter = 0
counter = 0
Use of min_<foo<max_ is permitted in python
if (ct > ct_min) and (ct < ct_max):
if ct_min < ct < ct_max:
Pick your framework
You're learning new stuff, so your style will develop as you progress. While the code is still fresh, try to refactor as you go, so that the code moves towards a consistent style. If you want to move towards FluentAssertions, then try to use it for all of your assertions. Rather than this:
// Fluent Assertions
You've got some answers to your initial questions, which you seem to be happy with, so I'm not going to address them. There are some things that I noticed about your code, however which I think are worth mentioning.
Naming Consider losing 'test' from the front of your test names. All the methods are annotated and in test class. Having the word test ...
This is a decent improvement over your first posting. Let's start off with some things you are doing right.
Your use of Decimal is correct. Many first attempts will incorrectly use double.
Most names are fairly good. Whereas many will over-abbreviate, you tend to make the names too long.
Let's think of how an ATM should work. A ...
There are two many assert statements in a single test function. Ideally each function should only test one thing. That way when the test fails you know exactly what is wrong.
Instead of initializing test data in the test function, you can write fixtures. Each fixture can be used in multiple test functions.
You don't need to assert '...