-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- replace CollapseException with ValueExistsException, which trumps it - configure py.test to run doctests in docs dir as well as tests dir
- Loading branch information
Showing
27 changed files
with
49 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
docs/caveat-unique-values.rst.inc → docs/caveat-unique-values.doctest.rst.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
[pytest] | ||
testpaths = bidict tests docs | ||
addopts = --ignore=docs/conf.py --ignore=setup.py --doctest-modules --collect-only | ||
; need to collect doctest from files ending in .rst, .rst.inc, and .txt, | ||
; but doctest-glob option not multi-allowed. resort to including "doctest" in | ||
; filenames of all doctest files we want collected and matching on that. | ||
addopts = --doctest-modules --doctest-glob=*doctest* --ignore=docs/conf.py --ignore=setup.py --ignore=docs/_build | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
doctest_optionflags = IGNORE_EXCEPTION_DETAIL ELLIPSIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Test script for bidict.loosebidict:: | ||
|
||
>>> from bidict import loosebidict | ||
|
||
Initializing with different keys mapping to the same value succeeds:: | ||
|
||
>>> loosebidict([(1, 1), (2, 1)]) | ||
loosebidict({2: 1}) | ||
|
||
Adding a new key associated with an existing value succeeds:: | ||
|
||
>>> b = loosebidict({1: 1}) | ||
>>> b[2] = 1 | ||
>>> b | ||
loosebidict({2: 1}) | ||
>>> b.update({3: 1}) | ||
>>> b | ||
loosebidict({3: 1}) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Hi @pfctdayelise, @tomviner (in case either of you have a moment for a py.test question), am I missing something here? Or is there a better workaround?