minor fixes, cleanups
This commit is contained in:
parent
8c092e9152
commit
1dcb0fbf5f
4 changed files with 8 additions and 4 deletions
1
.github/workflows/pylint.yaml
vendored
1
.github/workflows/pylint.yaml
vendored
|
|
@ -37,4 +37,5 @@ jobs:
|
|||
run: |
|
||||
pylint --errors-only mmgen
|
||||
pylint --errors-only test
|
||||
pylint --errors-only examples
|
||||
pylint --errors-only --disable=relative-beyond-top-level test/cmdtest_py_d
|
||||
|
|
|
|||
|
|
@ -399,8 +399,10 @@ class Config(Lockable):
|
|||
do_post_init = False,
|
||||
process_opts = False ):
|
||||
|
||||
# Step 1: get user-supplied configuration data from a) command line, or b) first argument
|
||||
# to constructor; save to self._uopts:
|
||||
# Step 1: get user-supplied configuration data from
|
||||
# a) command line, or
|
||||
# b) first argument to constructor;
|
||||
# save to self._uopts:
|
||||
self._cloned = {}
|
||||
if opts_data or parsed_opts or process_opts:
|
||||
assert cfg is None, (
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ init_tests() {
|
|||
t_lint="
|
||||
- $pylint --errors-only mmgen
|
||||
- $pylint --errors-only test
|
||||
- $pylint --errors-only examples
|
||||
- $pylint --errors-only --disable=relative-beyond-top-level test/cmdtest_py_d
|
||||
"
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class UnitTestHelpers:
|
|||
exc_w = max(len(e[1]) for e in data)
|
||||
m_exc = '{!r}: incorrect exception type (expected {!r})'
|
||||
m_err = '{!r}: incorrect error msg (should match {!r}'
|
||||
m_noraise = "\nillegal action 'bad {}' failed to raise an exception (expected {!r})"
|
||||
m_noraise = "\nillegal action '{}{}' failed to raise an exception (expected {!r})"
|
||||
for (desc,exc_chk,emsg_chk,func) in data:
|
||||
try:
|
||||
cfg._util.vmsg_r(' {}{:{w}}'.format(pfx, desc+':', w=desc_w+1))
|
||||
|
|
@ -138,7 +138,7 @@ class UnitTestHelpers:
|
|||
assert exc == exc_chk, m_exc.format(exc,exc_chk)
|
||||
assert re.search(emsg_chk,emsg), m_err.format(emsg,emsg_chk)
|
||||
else:
|
||||
die(4,m_noraise.format(desc,exc_chk))
|
||||
die(4,m_noraise.format(pfx,desc,exc_chk))
|
||||
|
||||
tests_seen = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue