CI: Doctests failing on master
See original GitHub issueThe next doctests are failing on master, and are breaking the CI. Didn’t check what caused the problem, would be good to understand (I guess we merged a PR that wasn’t updated). In any case, we should update the output, so the CI is green again:
_______________ [doctest] pandas.core.construction.extract_array _______________
398 Categories (3, object): ['a', 'b', 'c']
399
400 Other objects like lists, arrays, and DataFrames are just passed through.
401
402 >>> extract_array([1, 2, 3])
403 [1, 2, 3]
404
405 For an ndarray-backed Series / Index a PandasArray is returned.
406
407 >>> extract_array(pd.Series([1, 2, 3]))
Expected:
<PandasArray>
[1, 2, 3]
Length: 3, dtype: int64
Got:
array([1, 2, 3])
/home/runner/work/pandas/pandas/pandas/core/construction.py:407: DocTestFailure
_______________ [doctest] pandas.core.indexing.IndexingMixin.loc _______________
356 Alignable boolean Series:
357
358 >>> df.loc[pd.Series([False, True, False],
359 ... index=['viper', 'sidewinder', 'cobra'])]
360 max_speed shield
361 sidewinder 7 8
362
363 Index (same behavior as ``df.reindex``)
364
365 >>> df.loc[pd.Index(["cobra", "viper"], name="foo")]
Differences (unified diff with -expected +actual):
@@ -1,4 +1,3 @@
max_speed shield
-foo
cobra 1 2
viper 4 5
/home/runner/work/pandas/pandas/pandas/core/indexing.py:365: DocTestFailure
__________________ [doctest] pandas.core.indexing._LocIndexer __________________
1043 Alignable boolean Series:
1044
1045 >>> df.loc[pd.Series([False, True, False],
1046 ... index=['viper', 'sidewinder', 'cobra'])]
1047 max_speed shield
1048 sidewinder 7 8
1049
1050 Index (same behavior as ``df.reindex``)
1051
1052 >>> df.loc[pd.Index(["cobra", "viper"], name="foo")]
Differences (unified diff with -expected +actual):
@@ -1,4 +1,3 @@
max_speed shield
-foo
cobra 1 2
viper 4 5
/home/runner/work/pandas/pandas/pandas/core/indexing.py:1052: DocTestFailure
The next command should report the above errors, and should return clean after the fixes: ./ci/code_checks.sh doctests
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Doctest failure (test_chapter_align_line_02857) in tests for ...
Setup I am reporting a problem with Biopython version, Python version, and operating system as follows: I'm trying to package Biopython 1.77 ...
Read more >Mailman 3 CI CD test failure - Python mailing list
Hi everyone, I am facing some issues with the pipeline. While creating docs for issue #442 of mailman core, I updated my local...
Read more >Expected==Got doctests failing - Stack Overflow
Learning how to use doctest today. Earlier I found out about having to add <BLANKLINE>. Now how do I get the remaining failing...
Read more >Better Ways to Test with doctest – the Fastest C++ Unit Testing ...
In this guest blog post, Viktor Kirilov shares how Doctest, a new C++ testing ... [doctest] test cases: 1 | 0 passed |...
Read more >doctest: Test interactive Haskell examples - Hackage
If you see an error like the following, ensure that QuickCheck is visible to doctest (e.g. by passing --build-depends=QuickCheck to cabal repl ) ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not exactly. Those doctests are broken in master, which means that any PR that we open now, even one with an empty commit, will fail, and we won’t be able to merge it. So, the PR for this issue is the first one that should be merged, before we can merge anything else.
okay got it