Dan Streetman
52739e44ad
test: simplify test_help with subtests
...
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
2021-02-02 06:25:12 -05:00
Dan Streetman
12c2e6bf42
test: remove unneeded stuff in test/__init__.py
...
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
2021-02-02 06:25:12 -05:00
Dan Streetman
ae74f71a1e
test: remove flake8 and pylint unittest files
...
unit tests aren't needed just to run flake8 or pylint.
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
2021-02-02 06:25:12 -05:00
Dan Streetman
48c7130008
test: remove dep on mock, use unittest.mock instead
...
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
2021-02-02 06:25:12 -05:00
Dan Streetman
fe4d2f08a5
test: remove test_dsc_missing test
...
This test class performs 'local source package' tests, but a missing
local dsc file won't perform any local test, it will query the LP server.
The test attempted to narrowly mock out specific network access to
emulate a 'missing' package by trying to return 404 when the url from
SourcePackage._lp_url() is opened, but now that _lp_url() is removed,
a missing local dsc file will result in full querying of the LP api,
which is not as easily mocked.
2020-03-06 13:01:37 +01:00
Dan Streetman
1a30454d1e
test: remove test_archive obsolete tests
...
some tests mocked into the implementation of archive.py, which has now
changed dramatically, and the tests are no longer valid.
2019-11-25 10:10:06 -05:00
Dan Streetman
90e8fe81e1
replace ubuntutools.logger with standard python logging
2019-11-25 10:10:06 -05:00
Dan Streetman
3a413760f3
ubuntutools: add pull-* --no-verify-signature option, don't fail if no pub key
...
Change dsc verification to fail only if the public key was available, but
signature verification failed. If no public key is available for the dsc,
print warning only. (LP: #1700846 )
Also add pull-* parameter --no-verify-signature to manually prevent failure
when signature verification fails.
2019-11-25 10:10:06 -05:00
Dan Streetman
b96885f05e
ubuntutools/archive: convert external rmadison call to native implementation
...
instead of a function that calls the system program rmadison, use
a fully-functional class to interface with the madison api, as well
as the debian snapshot api
2019-11-25 09:57:54 -05:00
Dan Streetman
b0c22e1d57
pull-pkg: update archive.py SourcePackage
...
verify it can parse/load DSC when created
throw PackageNotFoundException from lp_spph if can't find package
update test case expected order of url processing
2019-11-25 09:57:54 -05:00
Dan Streetman
0931098a2c
tests/pylint.conf: use jobs=0 to speed up tests
2019-11-07 15:03:29 -05:00
Mattia Rizzolo
434ca8952e
Merge branch 'python3' of git+ssh://git.launchpad.net/ubuntu-dev-tools
...
MR: https://code.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/372305
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2019-09-10 14:19:07 +02:00
Dan Streetman
a7d166b52f
pull-pkg: use ubuntutools/version/Version
...
instead of debian.debian_support.Version, use ubuntutools version,
which extends it and adds the strip_epoch() function which is
needed to convert full version string to version used in filenames
2019-09-09 12:25:21 -04:00
Stefano Rivera
7b2f1a713b
Remove more Python 2 fallback imports
2019-09-05 09:49:41 -03:00
Stefano Rivera
301569e809
Pull out Python 2 support hacks
2019-09-04 19:24:44 -03:00
Stefano Rivera
bb765237db
Port Python scripts to Python 3, remove python 2 modules. ( Closes : #938740 , LP: #1099537 )
2019-09-04 19:24:44 -03:00
Stefano Rivera
a41af75643
Close FDs after tests
2019-09-04 19:24:44 -03:00
Stefano Rivera
2d3765522e
Use the Popen() encoding flag to decode to unicode
...
This should make behavior identical on Python 2 & 3.
2019-09-04 19:24:44 -03:00
Stefano Rivera
5769a70d02
Increase --help timeout, seeing a few of them
2019-09-03 21:16:59 -03:00
Stefano Rivera
e163ee0158
Test with the pylint command, we don't have py2+3 versions any more
2019-09-03 21:10:38 -03:00
Mattia Rizzolo
3fb7516d72
Default to checking signatures while pulling a .dsc.
...
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2019-08-05 13:50:33 +02:00
Benjamin Drung
74df5b3869
Update pylint and flake8 unittests
...
Import improvements from https://github.com/bdrung/snippets
2018-10-06 17:42:59 +02:00
Benjamin Drung
468dbc7746
ubuntutools/test: Introduce get_source_files function
...
The flake8 and pylint unittest use the same logic to determine the source
files. Therefore put this logic in one function.
2018-10-06 17:16:12 +02:00
Mattia Rizzolo
607f5a712f
Fix FTBFS due to newest tar being picker about arguments order
...
Closes : #897478
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2018-05-10 10:38:25 +02:00
Mattia Rizzolo
edb49c652c
Fix test failures with newer flake8 and pylint.
...
Closes : #891721
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2018-03-08 12:56:36 +01:00
Iain Lane
0a3738cfbc
Fix some 2/3 differences and run pylint with confidence=HIGH
...
Too many false positives otherwise.
2017-05-30 11:22:49 +01:00
Iain Lane
179f45ca9c
Add some more ignores for pylint
...
It doesn't work very well with apt_pkg.
2017-05-30 10:27:22 +01:00
Benjamin Drung
18ae4d8a39
Add flake8 check to test suite
2017-05-01 00:20:17 +02:00
Benjamin Drung
cc7170eccb
Fix all flake8 issues
2017-05-01 00:20:03 +02:00
Benjamin Drung
67c353d91b
Raise maximum line length to 99
2017-04-30 22:31:09 +02:00
Benjamin Drung
ba16daf56f
Repair pylint test case
...
The --include-ids parameter was dropped from pylint and thus the command
failed as was skipped. Repair the pylint check and add support for
Python 3.
2017-04-30 22:29:41 +02:00
Dimitri John Ledkov
99eb51b4e1
Fix test_config to skip Unicode environment variable test, when python
...
interpreter is not running in an unicode capable locale.
2015-01-19 15:21:00 +00:00
Dimitri John Ledkov
8ae64c16e2
Disable test_dsc_badsig, when no networking is available.
2014-12-18 23:35:00 +00:00
Dimitri John Ledkov
866adfd768
Actually, now that more things expect streaming bytes over the wire
...
the mirror tests don't stall anymore. Also use a codec.reader to slurp
up unicode bytes for json.load.
2014-12-18 23:18:00 +00:00
Dimitri John Ledkov
5da114b070
More consistent binary handling throughout.
...
Don't mock open(..., "b") with str / StringIO.
Silence source package pull, buffered/mocked output does not flush.
Disable mirror tests on python3, stall/hang.
2014-12-18 23:03:23 +00:00
Dimitri John Ledkov
412afabc1c
Fix maintainer
2014-12-18 21:54:52 +00:00
Dimitri John Ledkov
1bab644191
Conf fixes
2014-12-18 21:53:00 +00:00
Dimitri John Ledkov
ddabeed530
Fix ups
2014-12-18 21:34:13 +00:00
Dimitri John Ledkov
d86cacddf9
finish no-regress pre-port.
2014-12-18 21:18:01 +00:00
Dimitri John Ledkov
b8cf7b113e
logger
2014-12-18 21:11:00 +00:00
Dimitri John Ledkov
dae4c18c9e
update_maintainer
2014-12-18 21:09:44 +00:00
Dimitri John Ledkov
a7f4fc202b
fix test_config
2014-12-18 21:06:44 +00:00
Dimitri John Ledkov
8b5db046be
t/t_config
2014-12-18 21:03:27 +00:00
Dimitri John Ledkov
d4f6ef320e
remains of mox
2014-12-16 01:44:13 +00:00
Dimitri John Ledkov
88e3d1d6ba
Port http_mock to mock.
2014-12-15 04:24:41 +00:00
Dimitri John Ledkov
522030be12
don't keep unused mocks
2014-12-15 03:47:59 +00:00
Dimitri John Ledkov
72487d0477
Stubout
2014-12-15 03:42:49 +00:00
Dimitri John Ledkov
7d70b6b3a3
Dropping mox
2014-12-15 03:25:41 +00:00
Stefano Rivera
e21f15865c
* Thanks for the NMU, Paul.
...
* Non-maintainer upload.
* Change debian.tar.gz to debian.tar.xz (Closes : #738413 )
2014-02-25 22:46:10 +02:00
Loïc Minier
658946c214
Encode the developer name in the current locale to run the test; thanks
...
Stefano Rivera.
2013-05-15 02:18:50 +02:00