Python Advanced (2021-12-01 - 2021-12-03)

Day 1

Basics Recap

Group Project Preparation

  • At the basis: pytest Introduction, By Example

  • Talking about IoT sensors posting crap into cloud

  • Which kind of crap will sensors post into cloud?

  • Sensor hardware (irrelevant to us). We write software to deal with it

  • We do not want to have

    • … a real sensor where we need a Diesel engine to make it send out vibrations. We just want a sensor that send out vibrations when we tell it to.

    • … a big fat OPC/UA broker in the middle. Not even a lighter MQTT broker. Nor do we want to depend on an internet cloud provider for testing.

  • We sure can do something with multithreading. Let the sensor threads hammer their data into a thread-safe queue (as an in-process replacement for a fat broker).


Day 2

Plan: write a number of sensor classes

  • SensorRandom

  • SensorSine

  • SensorConstant

All these sensors should be decoupled from wall clock time - testing time series data is hard when you must deal with time. We don’t.

../../../../_images/timeaxis-vibrcheck-yes.png ../../../../_images/timeaxis-vibrcheck-no.png

Wild hacking expected.


  • jjj refer to test cases

  • jjj refer to thread series

  • jjj refer to tests for tomorrow

Day 3