1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 02:36:15 +01:00
Commit Graph

94 Commits

Author SHA1 Message Date
Marcus Huewe
502dbaa030 tests.common: req.data can also be a file-like object 2016-05-29 16:21:01 +02:00
Marcus Huewe
0de99cadbb - added comment for a change introduced in commit 4d3fcd9dc1 2015-08-13 14:13:08 +02:00
Oleg Girko
4d3fcd9dc1 Fix Python 3 support.
This change fixes errors when running test suite with Python 3.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2015-08-13 12:44:19 +01:00
a031dbd083 show review comments in an own line. Before they started in the same line, but reached on typical
screens anyway the second line if they had more than a few chars.
2015-08-13 08:07:34 +02:00
7b79298138 - fix test case for showing update link 2015-03-09 09:04:33 +01:00
3d07bd8460 - fix description rendering in history elements 2014-09-11 14:34:22 +02:00
Christian Berendt
d35983d5b8 Resolve PEP8 issue W291
* W291 trailing whitespace
2014-08-12 15:01:16 +02:00
f29a1b6e79 - follow in test suite the old/new setlinkrev behaviour 2014-05-16 11:58:36 +02:00
Marcus Huewe
570e3e5c85 - tests/test_setlinkrev: added two new testcases
Behave correctly if the _link already has a rev attribute.

Also added a fixture file that I forgot in
commit 6b579791a1.
2014-03-03 22:41:51 +01:00
Marcus Huewe
6b579791a1 - tests.test_setlinkrev: adjusted testcases for the new set_link_rev semantics (see #72) 2014-03-03 21:54:59 +01:00
Ludwig Nussel
f065dc4765 show source revision in submit requests 2014-02-27 16:46:49 +01:00
7b3b9ebc0f Fix fixtures for commit 2014-02-27 16:45:44 +01:00
Marcus Huewe
4ef62d0daf - tests.test_commit: added new testcase
Only update storefiles if the commit was successful (see bug #65)
2014-01-09 13:53:41 +01:00
Marcus Huewe
57d9b48dc0 - tests.suite: added TestConf testcase to suite 2014-01-08 15:43:57 +01:00
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