1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-11 07:06:16 +01:00
Commit Graph

17 Commits

Author SHA1 Message Date
Michal Vyskocil
b787ca2b39 python3 compatibility: make all unit test pass
There are many places can't be covered by 2to3, especially the
str/unicode -> str/bytes change done in python3. This is a big patch
incorporating all changes made in order to make python3 suite.py run
without any single failure.

It

 * adapt the introspect_handler_3 for case there are no __defaults__
 * adds the ET_ENCODING variable for ET.fromstring ("unicode" in py3,
  "utf-8" in py2)
 * (re)adds various builtins to both python versions
    - memoryview to python 2.6
    - bytes compatible with py3 to 2.6 and 2.7

and it changes few parts of tests/common.py in order to be compatible
with python3

 * new urlcompare method compares all components or url + parsed query
   string in a dictionary, so the ordering, neither quoting does not matter
 * bytes builtin has been added to 2.x and used in assertEqualMultiline
2013-04-16 10:51:42 +02:00
Michal Vyskocil
f0186dbde8 python3 compatibility: fix all tests 2013-04-16 10:51:42 +02:00
Adam Spiers
57c8cffe66 - add prdiff subcommand and test suite 2013-01-18 22:38:21 +00:00
Adam Spiers
9b1c6f0204 - refactor assertEqualMultiline into common.py for reuse
This will be reused by the tests for the imminent prdiff subcommand.
2013-01-18 22:38:21 +00:00
Marcus Huewe
46b9fd36e4 - tests.common: disable usage of keyring and gnome-keyring in the testsuite
Otherwise it'll lead to (unexpected) errors if python-keyring or gnome-keyring
are installed.
2013-01-18 14:27:28 +01:00
Marcus Huewe
e1080aa476 - common.py, __get_response: support "code" keyword argument to specify the http status code 2011-03-21 16:52:13 +01:00
Marcus Huewe
b99a903873 - def setUp: added "copytree" parameter to disable the copy of the "osctest" dir 2010-12-30 01:57:41 +01:00
Marcus Huewe
1a0cea8a4d - fixed testsuite 2010-11-30 19:11:05 +01:00
Marcus Huewe
57a3832a8e - rewrote "def commit"
- the upload revision isn't used anymore instead we commit via
  cmd=commitfilelist
- extended and adjusted testcases
2010-09-03 17:46:01 +02:00
Marcus Huewe
3cf8a5bf88 - fixed commit (Package class)
- use "self.rev" when calling update_local_filesmeta (otherwise we might get a newer revision)
- write addlist after commit
2010-08-31 13:30:37 +02:00
Marcus Huewe
2ffd46a9c2 - get rid of the init_package_dir mess
moved code into the staticmethod "init_package" of the Package class.
Cleaned up "checkout_package"
2010-08-31 13:30:37 +02:00
Marcus Huewe
1d7c674d80 - adjusted testcase for the init_basicauth change in master 2010-08-31 13:30:36 +02:00
Marcus Huewe
62dc807378 - moved common methods into the OscTestCase class 2010-08-31 13:30:36 +02:00
Marcus Huewe
71e0b3ee34 - GET decorator: use name of the original method for the wrapper method 2010-08-31 13:30:36 +02:00
Marcus Huewe
88a961cae4 - rewrote addfile() and delete_file() methods from the Package class (for the details see below)
- addfile():
  * contains the complete logic for adding a file (=> simplified addFiles(...))
  * semantic fixes
- delete_file():
  * semantic fixes
- different handling of newly added/replaced files:
  * added/replaced files are tracked in the .osc/_to_be_added file
- introduced new file state 'R': 'R' == "replaced"
  * usecase: osc rm <file>; osc add <file> => new state is 'R'
  * conceptually 'R' is equal to 'A'
- adapted revert() to support the new state (+ some other minor fixes)
- added testcases for addfile() and delete_file()
2010-08-31 13:30:36 +02:00
Marcus Huewe
e6b451596c - moved __change_to_pkg into common module (new name _change_to_pkg)
removed unused method "__expected_requests" from TestUpdate class
2010-08-31 13:30:36 +02:00
Marcus Huewe
f4adf69ef9 - refactored testcase code: moved common stuff into a common module 2010-08-31 13:30:36 +02:00