Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate out arithmetic tests for datetimelike indexes #18049

Merged
merged 7 commits into from
Nov 1, 2017

Conversation

jbrockmendel
Copy link
Member

As discussed... somewhere. I'll find the reference tomorrow.

This is about as close as I could get to pure cut/paste. There are a few notes to sprinkle in about things to clean up in a follow-up.

In a couple places this wraps some string literals to make folding easier.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you show the before & after number of tests fo r the affected files (to make sure not missing any). a couple of comments.

tm.assert_index_equal(result2, result3)


# FIXME: This was moved from `test_tools`. It belongs in scalar tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so let's move it there

assert result.freq is None


# FIXME: This came from `test_timedelta`, does not appear to have
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the class names came from a previous round of moving tests, you can remove/rename them if it doesn't make sense (in fact I generally don't like classes for organizing , and much prefer separate well-named files, changing this is out of scope for this PR). This plays nicer with pytest.

@jreback jreback added Period Period data type Testing pandas testing functions or related to the test suite Timedelta Timedelta data type Datetime Datetime data dtype labels Oct 31, 2017
@jbrockmendel
Copy link
Member Author

Looking at tests.indexes: 3824 under PR, 3829 under master. Removal of duplicate Julian tests accounts for the difference

@jbrockmendel
Copy link
Member Author

From Travis log:

=================================== FAILURES ===================================
________________ TestClipboard.test_round_trip_valid_encodings _________________
self = <pandas.tests.io.test_clipboard.TestClipboard object at 0x7f8377152438>
    def test_round_trip_valid_encodings(self):
        for enc in ['UTF-8', 'utf-8', 'utf8']:
            for dt in self.data_types:
>               self.check_round_trip_frame(dt, encoding=enc)
pandas/tests/io/test_clipboard.py:136: 
[...]
>       raise AssertionError(msg)
E       AssertionError: DataFrame are different
E       
E       DataFrame shape mismatch
E       [left]:  (5, 3)
E       [right]: (2, 2)
[...]
pandas/util/testing.py:1089: AssertionError
============================ 15513 tests deselected ============================
 1 failed, 518 passed, 22 skipped, 15513 deselected, 1 xfailed in 164.49 seconds 
sys:1: ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_INET, type=2050, proto=0, laddr=('0.0.0.0', 0)>
[...]
..ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ignored in: 'pandas._libs.lib.is_bool_array'
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
.................ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ignored in: 'pandas._libs.lib.is_bool_array'
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
.ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ignored in: 'pandas._libs.lib.is_bool_array'
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'

No idea if the buffer mismatches are related to the TestClipboard error. The latter has shown up a handful of times and usually goes away with re-running the CI.

@codecov
Copy link

codecov bot commented Nov 1, 2017

Codecov Report

Merging #18049 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18049      +/-   ##
==========================================
- Coverage   91.24%   91.23%   -0.02%     
==========================================
  Files         163      163              
  Lines       50114    50114              
==========================================
- Hits        45729    45720       -9     
- Misses       4385     4394       +9
Flag Coverage Δ
#multiple 89.04% <ø> (ø) ⬆️
#single 40.24% <ø> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c65a0f5...f457e43. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Nov 1, 2017

Codecov Report

Merging #18049 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18049      +/-   ##
==========================================
- Coverage   91.24%   91.23%   -0.02%     
==========================================
  Files         163      163              
  Lines       50114    50114              
==========================================
- Hits        45729    45720       -9     
- Misses       4385     4394       +9
Flag Coverage Δ
#multiple 89.04% <ø> (ø) ⬆️
#single 40.24% <ø> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c65a0f5...f457e43. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 1, 2017

Codecov Report

Merging #18049 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18049      +/-   ##
==========================================
- Coverage   91.24%   91.23%   -0.02%     
==========================================
  Files         163      163              
  Lines       50114    50114              
==========================================
- Hits        45729    45720       -9     
- Misses       4385     4394       +9
Flag Coverage Δ
#multiple 89.04% <ø> (ø) ⬆️
#single 40.24% <ø> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c65a0f5...f457e43. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Nov 1, 2017

the clipboard tests are orthogonal to this. They fail occasionally, a restart of the job usually fixes.

However the is_bool_array is faulting somewhere in cython.

@jreback jreback added this to the 0.22.0 milestone Nov 1, 2017
@jreback jreback merged commit f052225 into pandas-dev:master Nov 1, 2017
@jreback
Copy link
Contributor

jreback commented Nov 1, 2017

thanks!

@jbrockmendel jbrockmendel deleted the tslibs-testing4 branch November 2, 2017 14:55
1kastner pushed a commit to 1kastner/pandas that referenced this pull request Nov 5, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Period Period data type Testing pandas testing functions or related to the test suite Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants