palaviv
7885e43b78
Merge remote-tracking branch 'upstream/features' into allow-none-as-parametrized-test-id
2016-03-20 18:57:17 +02:00
Roman Bolshakov
a736e26734
Merge remote-tracking branch 'pytest-dev/master' into fix-issue-138
2016-03-20 01:04:22 +03:00
Roman Bolshakov
fbc5ba08d9
Fix issue #138
2016-03-20 01:02:17 +03:00
palaviv
4b0237c8ee
added test for unique names when recievieng identical ids in parametrize
2016-03-19 21:42:47 +02:00
palaviv
877ca5a0bf
added test for None in paramtrized ids list
2016-03-19 21:38:24 +02:00
palaviv
a8cfd54871
added test for None in idmaker
2016-03-19 21:23:49 +02:00
Bruno Oliveira
5fcce8a7d6
Merge branch 'master' into merge-master-into-features
2016-03-18 18:26:56 -03:00
Tareq Alayan
fa6acdcfd4
junitxml: add properties node in testsuite level
...
The commit allow users to add a properties node in testsuite level see
example below:
<testsuite errors="0" failures="0" name="pytest" skips="1" tests="1"
time="11.824">
<properties>
<property name="ARCH" value="PPC"/>
<property name="OS" value="RHEL 7.2"/>
<property name="TestPlanURL" value="https://url .."/>
<property name="Automated" value="True"/>
</properties>
<testcase classname="git.....>
</testcase>
</testsuite>
The current situation is that properties node can be added to every
testcase node. However, sometimes we need some global properties that
applies to all testcases and give better description for the testsuite
itself.
2016-03-16 13:24:33 +02:00
Kale Kundert
5ceee08590
Fix CHANGELOG merge conflicts.
2016-03-14 11:55:50 -07:00
palaviv
1ee3d40dbe
allow parametrized nodes to be specified from command line
2016-03-13 23:37:21 +02:00
Kale Kundert
916c0a8b36
Fix Decimal() and __ne__() errors.
2016-03-11 16:29:18 -08:00
Kale Kundert
42a7e0488d
Properly handle inf, nan, and built-in numeric types.
...
This commit also:
- Dramatically increases the number of unit tests , mostly by borrowing
from the standard library's unit tests for math.isclose().
- Refactors approx() into two classes, one of which handles comparing
individual numbers (ApproxNonIterable) and another which uses the
first to compare individual numbers or sequences of numbers.
2016-03-11 08:49:26 -08:00
Ronny Pfannschmidt
4636bf6160
Merge pull request #1391 from malinoff/issue1342
...
LastFailed now creates .cache only when needed. Fixes #1342
2016-03-11 11:18:50 +01:00
Mike Lundy
9577120592
Allow custom fixture names for fixtures
...
When defining a fixture in the same module as where it is used, the
function argument shadows the fixture name, which a) annoys pylint and
b) can lead to bugs where you forget to request a fixture into a test
method.
This allows one to define fixtures with a different name than the name
of the function, bypassing that problem.
2016-03-09 14:58:54 -08:00
Bruno Oliveira
7a186df271
Improve error message when a plugin fails to import
2016-03-08 19:18:13 -03:00
Kale Kundert
bf97d5b817
Use the plus/minus unicode symbol in the repr string.
...
This was a challenge because it had to work in python2 and python3,
which have almost opposite unicode models, and I couldn't use the six
library. I'm also not sure the solution I found would work in python3
before python3.3, because I use the u'' string prefix which I think was
initially not part of python3.
2016-03-07 16:40:41 -08:00
Kale Kundert
dd28e28b34
Make a few stylistic improvements.
2016-03-07 10:10:54 -08:00
Kale Kundert
6f5e1e386a
Add a convenient and correct way to compare floats.
2016-03-07 10:10:54 -08:00
Ronny Pfannschmidt
6d4b14d7ee
Merge pull request #1438 from Bachmann1234/issue-1437
...
Make a good faith effort to display a bytestring when one is provided…
2016-03-06 06:48:32 +01:00
Ronny Pfannschmidt
fd0010e6e9
Merge pull request #1439 from pytest-dev/fix-1178
...
Support pytest.fail with non-ascii characters
Fixes #1178
2016-03-06 06:42:35 +01:00
Matt Bachmann
8ce32b0795
When a regex pattern contains bytes instead of a string use escape_encode to turn it into a string before further processing. Thanks @nicoddemus for the review and tips!
2016-03-05 21:04:34 -05:00
Bruno Oliveira
5d4703852e
Add test when using native strings with non-ascii chars
2016-03-05 19:34:15 -03:00
Bruno Oliveira
d8403d793f
Fix decoding issue while formatting SyntaxErrors during collection
...
This happens only in Python 2, as in Python 3 we receive
the "badline" in the exception is already properly encoded
Fix #578
2016-03-05 16:58:50 -03:00
Bruno Oliveira
24d3e01548
pytest.fail with non-ascii characters raises an internal pytest error
...
Fix #1178
2016-03-05 16:09:01 -03:00
TomV
3d2b7aeea5
issue469: junit parsing nodeid, add method test
2016-03-03 09:12:56 +00:00
TomV
28530836c9
issue469: add fix junit double colon split issue
2016-03-02 22:18:57 +00:00
Matt Williams
891e029518
Add a new doctest_namespace fixture
...
This fixture can be used to inject names into the namespace in which
your doctests run.
2016-03-02 12:43:57 +00:00
Lukas Bednar
7e758a9dc6
junit: allow multiple properties with same name
...
It might happen that test can be affected by two or more bugs.
I need to be able to track them all.
2016-02-29 16:00:26 +01:00
Florian Bruhin
c9927bb66f
Merge pull request #1414 from rygwdn/indexerror
...
catch IndexError exceptions when getting exception source location
2016-02-26 18:53:10 +01:00
Ryan Wooden
d98d655094
Simplify IndexError test.
2016-02-26 08:25:49 -04:00
Anatoly Bubenkov
cf9a09e988
catch IndexError exceptions when getting exception source location
2016-02-26 08:18:12 -04:00
Bruno Oliveira
d9ede1bac2
Add test for unconditional skip with reason
2016-02-25 20:02:34 -03:00
Bruno Oliveira
5f90907509
Fix skip/xfail markers in parametrized arguments
...
Fix #1412
2016-02-25 19:13:09 -03:00
Bruno Oliveira
96a331e32f
Display collect progress only when in a terminal
...
Fix #1397
2016-02-20 14:38:30 -02:00
Dmitry Malinovsky
e4d361b093
LastFailed now creates .cache only when needed. Fixes #1342
2016-02-16 11:42:04 +06:00
Bruno Oliveira
0eeb466f11
Fix strict xfail: it should behave exactly like xfail when a test fails
2016-02-15 19:18:48 -02:00
Bruno Oliveira
ee88679c54
Fix bug in strict xfail: test was not being actually called
2016-02-15 18:43:45 -02:00
Bruno Oliveira
7823838e69
Add strict option to xfail, making tests which XPASS to actually fail the suite
...
Fix #1355
2016-02-14 20:52:27 -02:00
Bruno Oliveira
a965386b9e
Add bool type to addini
2016-02-14 20:52:27 -02:00
Marcin Biernat
1b431d6644
fix formatting utf-8 error explanation
2016-02-12 20:28:06 +01:00
Ronny Pfannschmidt
bfa2fadac1
fix issue #1366 by showing a note on the --fulltrace option
2016-02-10 20:27:50 +01:00
Bruno Oliveira
51694b8295
Merge branch 'master' into issue1290-at-operator
2016-02-06 09:31:42 -02:00
TomV
7d107018e8
Fix #1290 : Py3.5's @ operator/assertion rewriting.
2016-02-05 23:09:57 +00:00
Ronny Pfannschmidt
de1a9f574c
merge from master
2016-02-05 00:10:28 +01:00
Georgy Dyuldin
79722ae89b
Add expected exceptions to 'DID NOT RAISE' msg
2016-02-03 14:12:41 +03:00
Bruno Oliveira
9f85d4c952
mark test_comments as xfail on pypy
...
while migrating this code it was noticed that this test was failing even
on the original py repository, so it was decided to xfail it and investigate
later
2016-01-25 23:18:04 -02:00
Bruno Oliveira
7a6f902f6f
Drop assertionnew and assertionold from _pytest._code
2016-01-25 23:18:04 -02:00
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00
Ronny Pfannschmidt
b825af2e66
pass trough annotated exceptions
2016-01-23 19:31:17 +01:00
Ronny Pfannschmidt
60e9698530
fix issue 1338
2016-01-23 19:12:51 +01:00
Ronny Pfannschmidt
9e6bb74d71
reformat monkeypatch core plugin/its tests
2016-01-23 19:12:51 +01:00
Bruno Oliveira
199fcf93d4
Merge branch 'master' into 'features'
2016-01-22 18:32:45 -02:00
Georgy Dyuldin
b28b3cc271
Add captured stdout to jUnit report on setup error
2016-01-20 20:13:01 +03:00
Bruno Oliveira
7b13c4bec0
Fix flakes
2016-01-14 21:01:57 -02:00
Ronny Pfannschmidt
bc32e45bb6
Merge pull request #1314 from The-Compiler/ci-verbose
...
Always show full comparison output if on CI.
2016-01-11 10:05:15 +01:00
Florian Bruhin
3e5c9038ec
Always show full comparison output if on CI.
...
When you don't get enough information with a test running on a CI, it's quite
frustrating, for various reasons:
- It's more likely to be a flaky test, so you might not be able to reproduce
the failure.
- Passing -vv is quite bothersome (creating a temporary commit and reverting
it)
For those reasons, if something goes wrong on CI, it's good to have as much
information as possible.
2016-01-11 08:45:04 +01:00
Ronny Pfannschmidt
b2c0864fbf
Merge pull request #1318 from nicoddemus/doctest-unicode-error
...
Fix decode error in Python 2.7 when docstrings contain a non-ascii character
2016-01-11 08:37:24 +01:00
foxx
f46de68804
Fixes bug with stdout/stderr capture on pdb
2016-01-09 12:04:26 +00:00
Bruno Oliveira
3c19cfcd9a
Fix decode error in Python 2.7 when docstrings contain a non-ascii character
...
Fix #628
2016-01-08 23:10:02 -02:00
Bruno Oliveira
b8784c28c9
Merge branch 'master' into 'features'
2016-01-08 21:51:34 -02:00
Bruno Oliveira
369d9ecaa5
pytest warnings emitted during ``pytest_terminal_summary`` are now properly displayed.
...
Fix #1305
2016-01-04 00:07:45 -02:00
Ronny Pfannschmidt
6c170201d6
Merge branch 'master' into features
2016-01-02 23:56:01 +01:00
Ronny Pfannschmidt
bf4de4bd68
Merge pull request #1294 from nicoddemus/doctest-bytes-literals
...
Doctest bytes literals
2016-01-01 18:18:08 +01:00
Bruno Oliveira
1bdf71730a
Complement #1255 by adding tests and docs
...
Fix #1242
2015-12-30 18:24:59 -02:00
Bruno Oliveira
a0edbb75a4
Implement ALLOW_BYTES doctest option
...
Fix #1287
2015-12-29 20:55:19 -02:00
Ulrich Petri
8d49abb0d1
Make monkeypatch differentiate ImportError sources
...
Previously `monkeypatch` assumed that any `ImportError` was caused by
a mistake in the specified import path. However this assumption is false
in case the import target itself causes an `ImportError`.
Fixes : #900
2015-12-27 22:44:23 +01:00
Ronny Pfannschmidt
ec5a429c77
junitxml tests: extend with extra items
2015-12-17 22:30:27 +01:00
Ronny Pfannschmidt
713069ebd4
implement review comments for #1266
2015-12-17 22:27:01 +01:00
Bruno Oliveira
81588d7f63
Remove obsolete "oldinterpret" module
2015-12-16 16:16:22 -02:00
Bruno Oliveira
af893aab26
Remove code related to support python <= 2.5
...
Fix #1226
2015-12-16 16:16:22 -02:00
Ronny Pfannschmidt
8bf7e7cc4b
fixes #1259 - take finalized nodes out of the mapping
...
this allows double node id usage for file based items
2015-12-16 19:09:44 +01:00
Bruno Oliveira
6ac31088c5
Merge branch 'master' into merge-master-into-features
2015-12-11 23:13:50 -02:00
aselus-hub
1216a27b44
added docstrign to inection collection test.
2015-12-10 15:19:08 -08:00
aselus-hub
74f7efd2a3
added line comparison that is pytest-sugar agnostic.
2015-12-10 15:10:55 -08:00
aselus-hub
34db8aed34
added verification that test actually passed.
2015-12-10 15:02:57 -08:00
aselus-hub
af54e09759
nit: fixed newline
2015-12-10 14:46:51 -08:00
aselus-hub
dfaeefd692
added test to verify injection.
2015-12-10 14:45:36 -08:00
Bruno Oliveira
86b6ce5042
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2015-12-10 19:41:14 -02:00
Bruno Oliveira
8b61a332ba
Merge remote-tracking branch 'bukzor/features-merge-master' into features
2015-12-10 19:03:55 -02:00
David Vierra
ccfd962170
Add "no -rP" case to test_pass_output_reporting
2015-12-08 17:33:03 -10:00
David Vierra
b417d7cb79
Add tests to test_terminal.py for -rp and -rP
2015-12-08 15:54:23 -10:00
Bruno Oliveira
1c46462991
Fix deprecated_call regression introduced in 2.8.4
...
Fix #1238
2015-12-08 22:40:05 -02:00
Buck Golemon
5ccb7b1ced
update test_recwarn to new style
2015-12-08 11:08:33 -08:00
Buck Golemon
eabf2f9091
Merge branch 'master' into features
...
Conflicts:
AUTHORS
_pytest/__init__.py
_pytest/hookspec.py
_pytest/recwarn.py
testing/test_recwarn.py
2015-12-07 14:28:59 -08:00
Ronny Pfannschmidt
7b7737bf96
handle duplicate test ids via collection and xdist each reporting
2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt
04e9ae75c8
add xfailing test for double test id failure
2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt
5eef6a2821
junitxml: fix python3 compat of the tests
2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt
5f5a7995b9
reintroduce junitxml report order and debug cleanups
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
0528e5b45f
junitxml: intermediate, move testcase generation to NodeReporter
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
9b04958303
junitxml: keep track of custom property insert order
...
+ review: should we allow the same key multile times
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
d0107c898e
junitxml restrucutre stat generation - use node tags
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
9128fec4c4
junitxml: simplify the api used for testing junitml
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
80bcf8d624
junitxml: simplify tests by creating a api wrapper
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
b8df5446c0
junitxml: yapf clean the tests
2015-12-07 21:54:24 +01:00
Bruno Oliveira
14bc3c4009
Fix pastebin when captured output contains non-ascii characters
...
Fix #1219
2015-12-03 20:07:18 -02:00
Bruno Oliveira
a54e4e64cd
Merge remote-tracking branch 'upstream/master' into pastebin-py3
2015-12-01 23:51:14 -02:00
Bruno Oliveira
6a2ebddc7c
Decode urlopen response in pastebin
...
Fix #1198
2015-12-01 23:33:37 -02:00
Florian Bruhin
0d2668017d
Fix spelling mistake in #1207 .
2015-11-30 17:33:34 +01:00
Florian Bruhin
aba55a0fb2
Fix terminal output if no tests were run.
...
Before:
==== in 0.00 seconds ====
After:
==== no tests run in 0.00 seconds ====
2015-11-30 17:24:40 +01:00
Ronny Pfannschmidt
b5d65e5139
Merge pull request #1206 from The-Compiler/collect-getattr
...
Don't collect classes with truthy __getattr__.
2015-11-30 17:23:47 +01:00