Commit Graph

14 Commits

Author SHA1 Message Date
Haibo Lin
e490764985 Involve bandit
JIRA: RHELCMP-8562
Signed-off-by: Haibo Lin <hlin@redhat.com>
2022-04-07 14:03:57 +08:00
Filip Valder
efff2c9504 Use pytest directly incl. support for posargs, e.g.:
tox -- -s -vvv tests/path/to/a/single/test_something.py

Signed-off-by: Filip Valder <fvalder@redhat.com>
2021-08-12 16:35:47 +02:00
Haibo Lin
4dcb6dee0d Use requirements.txt
JIRA: RHELCMP-1773
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-08-11 20:36:22 +08:00
Haibo Lin
3c72755814 Use pytest instead of nosetests
Nose has been in maintenance mode for the past several years
and pytest is a good replacement.

Other changes:
- Replace deprecated assertRegexpMatches with assertRegex
- Replace deprecated assertRaisesRegexp with assertRaisesRegex
- Replace deprecated SafeConfigParser with ConfigParser
- Force reinstall pytest and mock in tox virtualenv. This is because
  the globally installed packages may not work as expected(occured in
  jenkins job).

JIRA: RHELCMP-1619
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-07-29 14:57:16 +08:00
Haibo Lin
495a4c48b2 Run tests via tox
This could simplify jenkins job configuration and make the tasks
trackable in git.

JIRA: RHELCMP-1618
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-07-27 13:28:32 +08:00
Lubomír Sedlář
59e2aa9607 Fix flake8 issues
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2020-05-26 11:49:50 +02:00
Lubomír Sedlář
887c68d05d Display black output in tests
This should make fixing it much easier since it will directly tell users
what it doesn't like.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2020-03-05 09:51:47 +01:00
Haibo Lin
56fea60595 Run flake8 and black via tox
JIRA: COMPOSE-4108
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-07 16:14:45 +08:00
Haibo Lin
41a629969c Format code base with black
https://black.readthedocs.io/en/stable/

JIRA: COMPOSE-4086
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-05 17:35:47 +08:00
Haibo Lin
38142d30ba Format tests with black
JIRA: COMPOSE-4086
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-05 17:29:15 +08:00
Lubomír Sedlář
1c3637c48f Ignore more pycodestyle warnings
These warnings are ignored by default, but setting our own ignore list
removes these defaults.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-06-14 13:21:31 +02:00
Lubomír Sedlář
aa5487d544 Update tox.ini
Add more useless pycodestyle checks, and explain what the codes mean.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-01-11 14:37:41 +01:00
Lubomír Sedlář
7fd5403495 Ignore module imports not at top of file
In multiple places we need to set up import paths before importing
modules. This Flake8 warning is just noise.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-08-22 10:55:48 +02:00
Lubomír Sedlář
44d6f7d708 Update makefile targets for testing
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-23 13:03:11 +01:00