Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

Big news in #Python land.

Uncategorized
2 2 1

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    8 Views
    I have a question about Python libraries and testing scope.If I'm importing 'serial' in my library, and use it like the following to create a connection to a sensor:--- start code ---import serialclass Sensor: def __init__(self, serial_device): self.__serial_device = serial_device try: self.__connection = serial.Serial( port=serial_device, baudrate=9600, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, ) except serial.SerialException: print("Could not establish serial connection to sensor")--- end code ---how much testing should I do around the serial connection? Just mock up a few buffers (byte streams), and see how my class handles unexpected input?One the one hand, I want to make the library as solid as possible. On the other hand, I don't want to run tests on code I don't control (the library module). I know of the 'mock-serial' utility, but haven't used it.The aim is to make a Python version of my Arduino library for the CozIR Ambient CO2 sensor:https://codeberg.org/mjack/ambientCO2/src/branch/develop#python #unittest #testing #sensors
  • 0 Votes
    1 Posts
    9 Views
    I’m looking for work. I’m a highly technical #iOS dev. My last role was SWE on a distributed networking tool written in C, and I’ve also got experience with #Python , #Flask, and web development.#FediHire #GetFediHired #FediHired
  • 0 Votes
    1 Posts
    10 Views
    Privacy addio? OpenAI sta raccogliendo i numeri di chiunque: tu sei nella lista?📌 Link all'articolo : https://www.redhotcyber.com/post/privacy-addio-openai-sta-raccogliendo-i-numeri-di-chiunque-tu-sei-nella-lista/#redhotcyber #news #chatgpt #openai #ecosistemaopenai #importazionecontatti #hashing
  • #OpenAI si è fatta rimontare

    Uncategorized openai
    1
    0 Votes
    1 Posts
    4 Views
    #OpenAI si è fatta rimontareDa Google ad Anthropic negli ultimi mesi i software di AI più innovativi sono arrivati da altre aziende, che ora le contendono il primatoLeggi tutto: https://ilpost.link/cEn9K7WBIV@aitech @informapirata