Skip to content

Commit 0a78cc1

Browse files
committed
doc: remove old compatibility
1 parent 75b2bcc commit 0a78cc1

File tree

2 files changed

+6
-80
lines changed

2 files changed

+6
-80
lines changed

Diff for: README.rst

-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22
Python XML-Unittest
33
===================
44

5-
.. image:: https://travis-ci.org/Exirel/python-xmlunittest.svg?branch=master
6-
:target: https://travis-ci.org/Exirel/python-xmlunittest
7-
.. image:: https://coveralls.io/repos/Exirel/python-xmlunittest/badge.svg?branch=master&service=github
8-
:target: https://coveralls.io/github/Exirel/python-xmlunittest?branch=master
9-
.. image:: https://gemnasium.com/Exirel/python-xmlunittest.svg
10-
:target: https://gemnasium.com/Exirel/python-xmlunittest
11-
.. image:: https://badge.fury.io/py/xmlunittest.svg
12-
:target: http://badge.fury.io/py/xmlunittest
13-
145
Anyone uses XML, for RSS, for configuration files, for... well, we all use XML
156
for our own reasons (folk says one can not simply uses XML, but still...).
167

Diff for: doc/index.rst

+6-71
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ how spaces and tabs works in XML formatting.
2222

2323
Here comes XML unittest TestCase: if you want to use the built-in unittest
2424
package (or if it is a requirement), and you are not afraid of using xpath
25-
expression with lxml, this library is made for you.
25+
expression with ``lxml``, this library is made for you.
2626

2727
You will be able to test your XML document, and use the power of xpath and
2828
various schema languages to write tests that matter.
@@ -39,41 +39,9 @@ Links
3939
Compatibility
4040
=============
4141

42-
Python ``xmlunittest`` has been tested with:
42+
Python ``xmlunittest`` has been tested with ``lxml`` version 4.0 and 5.0
43+
with Python 3.10.
4344

44-
* ``lxml`` version 3.0, 3.4, 3.5 and 4.2.1
45-
* Python 2.7.12
46-
* Python 3.5.2
47-
48-
Be aware: as a lot of string manipulation is involved, a lot of issues can
49-
happen with unicode/bytestring. It's always a bit tough when dealing with
50-
a Py2/Py3 compatible library.
51-
52-
.. note::
53-
54-
Python 2.7.6 support is maintained for now, but it will be eventually
55-
dropped. It's never too late to switch to Python 3!
56-
57-
LXML version 2.x or 3.x?
58-
------------------------
59-
60-
When dealing with version number, it appears that ``xmlunittest`` works with:
61-
62-
* Python 2.7 and lxml 2.3.5 and above.
63-
* Python 3.5 and lmxl 3.0 and above.
64-
65-
.. warning::
66-
67-
No, ``xmlunittest`` **does not work** with Python 3 and an older version of
68-
lxml < 3.0. Also, note that this package is only tested with lxml >= 3.0.
69-
It works, but without warranty.
70-
71-
Why not Python 3.3 or 3.4?
72-
--------------------------
73-
74-
This package works with Python 2.7, but it's only because we are lucky enough.
75-
This is a small project, and it does not aim to support more than one major
76-
version of python.
7745

7846
How to
7947
======
@@ -100,7 +68,7 @@ Example::
10068
</root>"""
10169

10270
# Everything starts with `assertXmlDocument`
103-
root = self.assertXmlDocument(data)
71+
root = self.assertXmlDocument(data.encode('utf-8'))
10472

10573
# Check namespace
10674
self.assertXmlNamespace(root, 'ns', 'uri')
@@ -137,7 +105,7 @@ Example::
137105
<leaf id="3" active="off" />
138106
</root>"""
139107

140-
self.assertXmlDocument(data)
108+
self.assertXmlDocument(data.encode('utf-8'))
141109

142110

143111
Contribute
@@ -160,7 +128,7 @@ See an example of install (without virtualenv)::
160128
$ git clone [email protected]:YourRepo/python-xmlunittest.git xmlunittest
161129
$ cd xmlunittest
162130
$ pip install -r requirements.txt
163-
$ py.test test.py
131+
$ pytest test.py
164132
... all should be green here!
165133

166134
.. __: https://github.com/Exirel/python-xmlunittest
@@ -170,36 +138,3 @@ See an example of install (without virtualenv)::
170138
Installing lxml is not easy if you are not prepared. You will need some
171139
extra source package on your favorite OS (in particular some XML libs and
172140
python sources).
173-
174-
175-
Testing with tox
176-
----------------
177-
178-
Now that ``xmlunittest`` uses `tox`__ to run the tests, it's even easier to
179-
perform tests on multiple version of python. Instead of using ``py.test`` do::
180-
181-
$ tox test
182-
183-
And that's all! **Remember: Python 2.7 and Python 3.5. Nothing more.**
184-
185-
.. __: https://tox.readthedocs.org/en/latest/
186-
187-
Tips
188-
----
189-
190-
**Do**:
191-
192-
* Always test with both Python 2.7 and Python 3.5 - use Tox!
193-
* Always test with namespaces
194-
* Always provide unit-tests.
195-
* Always provide documentation.
196-
* It's better to respect PEP8.
197-
198-
**Don't**:
199-
200-
* Never add any other library. ``xmlunittest`` uses ``lxml`` and that's enough!
201-
* If you have to add a ``data.encode(charset)`` into an assert method, it's
202-
probably not a good idea.
203-
* XML documents can not be compared as simple strings. Don't compare them
204-
as simple string. **Don't.**
205-
* Don't write more than 80 characters per line. Please. **Don't.**

0 commit comments

Comments
 (0)