Michal Vyskocil
111fd87715
passx encode/decode functions
...
The string.encode('bz2') does not work in python3. Implement
passx_encode/passx_decode functions compatible with python 2.6, 2.7 and
3.3.
Add a simple unit test.
2014-01-08 15:43:57 +01:00
Marcus Huewe
f7eab473f0
- tests.test_prdiff: fixed testcases (got broken by commit bd3a6d2fc8
)
2013-11-11 09:15:59 +01:00
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
Marcus Huewe
d4b8fbbba4
- tests.test_prdiff: disabled the usage of keyrings when running the cli
...
Alternatively we could also disable the keyring usage in the config file.
2013-01-24 15:35:11 +01: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
33f3ab4203
- sigh... make jenkins happy again (finally)
...
The jenkins build got broken by commit 178120c99e
(python 2.6's re.sub doesn't support a flags argument).
2013-01-18 18:27:50 +01:00
Marcus Huewe
178120c99e
- make travis-ci happy again...
...
It got broken in commit 6a332bc1c6
2013-01-18 18:12:41 +01:00
Marcus Huewe
6a332bc1c6
- tests.test_difffiles: removed "count" argument from re.sub in __canonise_diff
...
Old python versions don't support "count". This should fix the jenkins build
again.
2013-01-18 17:11:42 +01:00
Marcus Huewe
203a4eeab5
- tests.test_difffiles: added TODO to __canonise_diff.
2013-01-18 16:37:08 +01:00
Adam Spiers
ef0f24c2f6
- avoid false negative failures due to trivial differences in diff hunk headers
...
When a hunk header refers to a single line in the "from"
file and/or the "to" file, e.g.
@@ -37,37 +41,43 @@
@@ -37,39 +41,41 @@
@@ -37,37 +41,41 @@
some systems will avoid repeating the line number:
@@ -37 +41,43 @@
@@ -37,39 +41 @@
@@ -37 +41 @@
so we need to canonise the output to avoid false negative
test failures.
2013-01-18 13:44:30 +00:00
Adam Spiers
479f5d5011
- improve output of assertEquals failures on multi-line strings
2013-01-18 13:44:30 +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
1000c26c6f
- fix fixtures for last vrev change
2012-03-02 16:10:36 +01:00
Sascha Peilicke
ca9e38c3d9
Generate JUnit-compatible XML test result reports if 'xmlrunner' is available.
2011-09-08 11:43:45 +02:00
Sascha Peilicke
af86600880
Fix tests/test_request.py, requests seem to have a trainling newline now
2011-08-18 16:02:34 +02:00
dbe99c338f
- follow changes during commit in test cases
2011-06-07 16:33:08 +02:00
Marcus Huewe
e247cf358c
- adjusted testsuite for the latest setlinkrev changes
2011-03-21 16:53:48 +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
f0eb8946d3
- also test _link without "project" attribute
2011-02-22 17:53:58 +01:00
Marcus Huewe
40928d2460
- added testcases for "set_link_rev"
2011-02-22 17:53:58 +01:00
Marcus Huewe
74594eb9ec
- adjusted testcase oscrc's for recent config changes
2011-02-11 12:44:48 +01:00
Marcus Huewe
73ffb036f8
- test_request: test get_actions method
2011-01-29 17:43:36 +01:00
Marcus Huewe
dda670f3de
- test_request: adjusted testcase to the latest format changes
2011-01-24 09:34:37 +01:00
Marcus Huewe
6132f89268
- test_deletefiles.py: new testcases for skipped files
2011-01-17 14:59:46 +01:00
Marcus Huewe
e1b1f66bae
- TestRequest: added testcase for action element with acceptinfo subelement
2011-01-12 22:20:47 +01:00
Marcus Huewe
8c26c74620
- added testcases for the rewritten Request class
2010-12-30 02:27:15 +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
d77f8919fe
- Project.init_project: return Project object
...
- adjusted testcases
2010-12-23 02:15:58 +01:00
Marcus Huewe
f8eae74898
- added new testcases in order to test the status methods for projects and packages
2010-12-22 23:12:24 +01:00
Marcus Huewe
062bb35c95
- removed unused imports
2010-12-19 20:32:06 +01:00
Marcus Huewe
70e43a87c2
- added testcases for #658664 ("osc: a package internal error occured")
...
- a file was marked as 'A' but the file didn't exist in the wc:
- if it's part of the commit abort
- otherwise ignore it
2010-12-17 23:23:39 +01:00
Marcus Huewe
71bedd4bb1
- new testcases for repair_wc: check if the passed parameter is a valid apiurl
2010-12-09 20:32:07 +01:00
Marcus Huewe
fffd0c395a
- added new testcases for #657838 ("osc 0.130: osc repairwc fails totally - working copy useless")
2010-12-07 20:29:59 +01:00
Marcus Huewe
1a0cea8a4d
- fixed testsuite
2010-11-30 19:11:05 +01:00
Marcus Huewe
48eaacef18
- new testcase: repairwc: repair a project wc with no apiurl
2010-10-10 21:36:07 +02:00
Marcus Huewe
cda7ffc040
- testcases for "init_project"
2010-10-09 16:25:44 +02:00
Marcus Huewe
c3c75689ef
- added testcases for repairwc in order to repair a wc if the "_apiurl" file is missing
2010-09-28 23:01:39 +02:00
Marcus Huewe
cc4805c059
- added testsuite for new "repairwc" command
2010-09-08 18:57:21 +02:00
Marcus Huewe
cb935861c8
- make wc consistent
2010-09-08 18:51:14 +02:00
Marcus Huewe
7075dd05a8
- commit missing fixtures...
2010-09-08 16:35:59 +02:00
Marcus Huewe
fdcfd5e315
- cleanup working copies...
2010-09-08 16:18:35 +02:00
Marcus Huewe
044c678455
- fixed test_difffiles testsuite for python2.7
...
python2.7's difflib slightly changed the format
2010-09-08 12:10:09 +02:00
Marcus Huewe
acbf2dabd5
- new testcase for a package without a revision
2010-09-06 18:11:12 +02:00
Marcus Huewe
5e72fa1284
- fixed "osc addremove": use delete_file(), initialize pac.todo correctly
...
- added new testcase
2010-09-06 15:28:23 +02:00
Marcus Huewe
0502e81b26
- added new testcase
2010-09-03 21:28:17 +02: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
5c8b258a6b
- fixed read_sizelimit: added missing strip
...
- fix for commit 89c9cb67f4
: self.size_limit should be an int
- added testcase for local _size_limit constraint
2010-09-03 16:09:56 +02:00
Marcus Huewe
89c9cb67f4
- renamed limit_size to size_limit (only internal variable changes)
...
- added new method "get_files_meta" to the Package class (which handles
the the "skip file and service stuff")
2010-09-03 14:51:20 +02:00
Marcus Huewe
94eb143d8c
- small fixes for do_status and get_diff
...
- get_diff:
* more helpful error message if a file was added and the local
file was removed again
* unify self.filenamelist and self.to_be_added if self.todo is empty
* extended testcases
- do_status: be able to run "osc st <nonexistentfile>"
2010-09-02 13:47:42 +02:00
Marcus Huewe
b718669685
- raise OscIOError instead of IOError (adjusted testcases)
2010-09-02 10:23:37 +02:00
Marcus Huewe
b6925f7b34
- arghs... finally all files should be present
2010-08-31 17:46:07 +02:00
Marcus Huewe
9fa5d7ea39
- added missing fixtures...
2010-08-31 17:44:05 +02:00
Marcus Huewe
7802dfa9ad
- fixed patch header
2010-08-31 17:30:31 +02:00
Marcus Huewe
3ac330f7cd
- fixed _meta_mode + added testcase
2010-08-31 16:54:44 +02:00
Marcus Huewe
947971b2a2
- workaround for git (because it doesn't support empty dirs)
2010-08-31 16:25:24 +02:00
Marcus Huewe
1da96d7df7
- propagate retval to the caller
2010-08-31 13:47:27 +02:00
Marcus Huewe
9c5c329a04
- get_diff: don't diff binary files
2010-08-31 13:30:37 +02:00
Marcus Huewe
9c2f1d85ca
- added testcase for the "def commit" method + _missing_ log message from a5a0917fce7124f9cc8458a9ee41ced521aa502e
...
missing log for a5a0917fce7124f9cc8458a9ee41ced521aa502e:
- added support for @POST, @PUT, @DELETE decorators
- support optional "exception" keyword arg for the decorators
(the specified exception will be raised before returning the response)
- moved "_check_digests" into the common module
2010-08-31 13:30:37 +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
c4ceb7f700
- adjusted store_write_string calls so that the storefile ends with a newline
...
- adjusted testcase fixtures for this change
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
19c63111b6
- added testcases for the new "get_diff" method
2010-08-31 13:30:36 +02:00
Marcus Huewe
d90228a7e3
- support a revert of a missing file which was added to the wc
2010-08-31 13:30:36 +02:00
Marcus Huewe
1d7c674d80
- adjusted testcase for the init_basicauth change in master
2010-08-31 13:30:36 +02:00
Marcus Huewe
9c0076d726
- added testcases for "def revert"
2010-08-31 13:30:36 +02:00
Marcus Huewe
e21e61f20e
- minor fixes
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
5b6aa0a4fc
- added testsuite module which aggregates all testcases
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
Marcus Huewe
a6efd9e970
- adjust testcase for commit 9205d4d902cd3d45747c30405acd92bd5f98d210
2010-08-31 13:30:36 +02:00
Marcus Huewe
d8c59c8438
- update: support special handling for _service: files
2010-08-31 13:30:35 +02:00
Marcus Huewe
63df61e452
- simplify
2010-08-31 13:30:35 +02:00
Marcus Huewe
58ca66a417
- update: always use 'rev' query parameter when fetching files
2010-08-31 13:30:35 +02:00
Marcus Huewe
e91475508e
- support limit_size parameter during update
...
also added testcases
2010-08-31 13:30:35 +02:00
Marcus Huewe
b6a2266a5e
- initial testcases for the new update mechanism
...
some generic stuff from test_update.py will be moved into a new
module later
2010-08-31 13:30:35 +02:00