You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve error message
When forgetting to install the protobuf compiler,
an error message is shown which had a missing
space between two words.
* Remove trailing whitespace
* Read file in one go
There is no reason to traverse the file
line by line if all we care about is the
last character.
This also uses unittests subTest to show
the file which fails the test.
* Fix header comment
* Use subTest to show all failing files
When one file is failing, due to the
fact that all tests contain for loops,
the other failures are swallowed because python
stops running the test on the first assertion.
With subTest one can introduce a subcontext which
allows showing all of the failed files as well a
diagnostic as to which file failed.
* Use enumeration index for line count
Python provides mechanisms for that, no
reason to manually track a count.
* Remove unused imports, only glob once
The globs where repeated a whole bunch of times
which is both information duplication as well
as unneccessary work.
* Remove needless conditionals in front of assert
There is no reason to guard the assertions
in the conditional.
* Switch build to python 3
Python2 is end of life in just a few days
and should not be recommended anymore.
* Improve assertion by using regex match.
The error message is quite good when using the
provided regex matcher.
* Only deploy on master
* Remove trailing whitespace
self.assertNotRegex(line, r"([\s>]|^)///\s*", file+" in line "+str(i) +": not permitted slash triplet found.")
38
25
39
26
40
27
deftest_backslash_triplet(self):
41
28
''' Test case is checking if there are backslash triplets in the documentation. -> doxygen didn't interpret something properly. '''
42
-
forfileinglob("doc/html/*.htm*"):
43
-
withopen(file, "rt") asfin:
44
-
i=0
45
-
46
-
forlineinfin:
47
-
i+=1
48
-
matchHash=re.search(r"([\s>]|^)\\\\\\\s*",line)
49
-
50
-
ifmatchHashisnotNone:
51
-
self.assertIsNone(matchHash, file+" in line "+str(i) +": not permitted backslash triplet found. Search for: '"+line[matchHash.start():matchHash.end()])
0 commit comments