Commit graph

18 commits

Author SHA1 Message Date
Luflosi d4dcc75711
Avoid "DeprecationWarning: invalid escape sequence"
Without this change, many warnings like this will be generated while running pytest:
```
test/test_template.py:3
  /build/source/test/test_template.py:3: DeprecationWarning: invalid escape sequence '\/'
    """!
```
This can also be seen when manually running python with warnings enabled.

This happens because the comment uses a multiline string and Python interprets the backslash in the logo as an escape character and complains that \/ is not a valid escape sequence. To fix this, prepend the string with the letter r to indicate that the backslash should be treated as a literal character, see https://docs.python.org/3/reference/lexical_analysis.html#index-20.
I also applied this change to all the comment strings since that shouldn't break anything and to establish it as a pattern for the future so this problem hopefully never happens again.

This is what I did specifically:
- Change the comment at the top of bw_client.py and bw_server.py to start with `"""!` since that seems to be the pattern here
- Search-and-Replace all occurances of `"""!` with `r"""!`
- Manually change the strings in `logoToLog()` in boswatch/utils/header.py
2023-09-19 17:49:09 +02:00
Bastian Schroll 7d8544123b
fix test start log message 2019-10-24 23:11:57 +02:00
Bastian Schroll 1d90b3d38b
fix some pyflakes 2019-10-23 22:11:57 +02:00
Bastian Schroll 50095bf4a7 fix errors 2019-10-23 09:19:32 +02:00
Bastian Schroll 096d6fefe3 add serverHigLoad test (10 clients a 100 packets) 2019-10-23 09:01:11 +02:00
Bastian Schroll 5f30bcb2f3 fix server test 2019-10-21 12:24:25 +02:00
Bastian Schroll 1ae54bee27 fix server test 2019-10-21 11:53:12 +02:00
Bastian Schroll 422109f3fe test changes 2019-10-21 11:22:53 +02:00
Bastian Schroll 0e587e7698 fix server test 2019-10-21 10:11:54 +02:00
Bastian Schroll 06549b8e26 some improvements 2019-10-20 19:07:16 +02:00
Bastian Schroll ae36cf8045 changes in client 2019-10-20 17:56:40 +02:00
Bastian Schroll 0445dc38cc fix test_serverStopsWhileConnected 2019-10-20 17:37:37 +02:00
Bastian Schroll 13fc8460b2 fix new test 2019-10-20 17:23:57 +02:00
Bastian Schroll 6f364b8e6a fix server client issues
- add test for server stops until clients connected
- add header for data packets
- check header on read and read only data size in
- make readings non blocking
2019-10-20 17:21:03 +02:00
Bastian Schroll 43674989b9 little change in server test 2019-03-03 20:14:46 +01:00
Bastian Schroll 69acff24e4 add doc strings for tests 2019-03-03 20:00:04 +01:00
Bastian Schroll 6f51d3e734 fix the "Redefining name ... from outer scope" in tests
problem of the pylint fixtures
2019-03-03 19:18:19 +01:00
Bastian Schroll 2ca62d90f2 move test files - fix config tests 2019-03-03 13:32:31 +01:00
Renamed from test/test_ServerClient.py (Browse further)