Commit graph

96 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
Jan Speller 9363fc80d5 add W504 to flake8-ignore because of some weird error involving W503 2021-01-06 23:42:51 +01:00
Jan Speller d67478690c ignore E722 and W605 for now because they produce a lot of errors 2021-01-06 23:19:59 +01:00
Jan Speller 21081360e2 change pytest config for flake8 2021-01-06 22:53:16 +01:00
Jan Speller 2b4e1c1bda update pytest plugins and options 2021-01-06 22:47:37 +01:00
Bastian Schroll 8e4dba28e3 PEP8 new line at end 2020-04-15 09:24:02 +02:00
Bastian Schroll 61819cda08 little fix 2020-04-15 08:52:44 +02:00
Bastian Schroll 806a3d8669 add non existent field test 2020-04-15 08:35:00 +02:00
Bastian Schroll e5141c186d
add comments 2020-04-14 18:47:12 +02:00
Bastian Schroll 370ad5ac85
add descriptor unit test 2020-04-14 18:33:49 +02:00
Bastian Schroll 7d8544123b
fix test start log message 2019-10-24 23:11:57 +02:00
Bastian Schroll a3494b54a6 improve testmode 2019-10-24 08:59:33 +02:00
Bastian Schroll 7d2e7597f7
add pyflakes to pytest 2019-10-23 22:12:42 +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 40e0a951da add some config tests 2019-10-21 10:28:46 +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 0c6044072a Merge branch 'develop' into process_manager 2019-09-20 14:54:07 +02:00
Bastian Schroll b157f96057 Merge branch 'develop' into process_manager 2019-09-19 10:54:51 +02:00
Bastian Schroll 4508d4dfb8 some little cleanups 2019-09-18 22:03:47 +02:00
Bastian Schroll 438dda48c2 prepare for mkdocs docu 2019-09-18 16:41:48 +02:00
Bastian Schroll 4f389723c0 some refactorings 2019-03-11 07:54:11 +01:00
Bastian Schroll d1d0624a36 remove emtpy doubleFilter test 2019-03-09 12:20:35 +01:00
Bastian Schroll bfa25d124a rename testdata file - cause pytest err 2019-03-05 12:41:27 +01:00
Bastian Schroll 66e0ede4c0 add testdata to the client 2019-03-05 12:32:56 +01: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 4b69b08028 fix test config file location and paths 2019-03-03 13:58:37 +01:00
Bastian Schroll 2ca62d90f2 move test files - fix config tests 2019-03-03 13:32:31 +01:00
Bastian Schroll 82e3eb719d move old files to __deprecated folder 2019-03-03 11:21:57 +01:00
Bastian Schroll a35dc15d60 edit pytest suite 2019-03-03 11:13:27 +01:00
Bastian Schroll e372fb75b4 fix some classes for testing 2019-03-03 09:56:36 +01:00
Bastian Schroll 61b4cc6631 fixe some testing issues 2019-03-01 12:20:48 +01:00
Bastian Schroll 9371b71ee0 add isRunning/isConnected Props to server and client 2019-02-28 08:57:41 +01:00
Bastian Schroll a8a4116464 edit config_tests 2019-02-27 13:06:41 +01:00
Bastian Schroll 54b4c1439a remove two not possible tests 2019-02-27 09:21:25 +01:00
Bastian Schroll 95c2cecc64 fix name error 2018-09-28 06:11:32 +02:00
Bastian Schroll bbf71a34a7
Merge branch 'develop' into broadcast 2018-09-25 19:06:56 +02:00
Bastian Schroll 22588caac5 add unittest 2018-09-25 18:50:52 +02:00
Bastian Schroll 3eac36d123 some little fixes 2018-09-25 10:08:00 +02:00