TST: stricter monotonicity/uniqueness tests (part 2)
State: closed

- [x] xref #23256
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Continuation of #23256.

By making the uniqueness tests stricter (i.e. testing for actual True/False rather than truthy/Falsy values) I think we get better ensurance that some PR doesn't accidentally turn a property into a method or that the property doesn't accidentally returns a non-boolean return value.

Labels:
name: Testing
description: pandas testing functions or related to the test suite

Comments:
Hello @topper-123! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/indexes/common.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/indexes/common.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/interval/test_interval.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/indexes/interval/test_interval.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/multi/test_duplicates.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/indexes/multi/test_duplicates.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/multi/test_integrity.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/indexes/multi/test_integrity.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexing/test_loc.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/indexing/test_loc.py) !

 - There are no PEP8 issues in the file [`pandas/tests/series/indexing/test_indexing.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/series/indexing/test_indexing.py) !

 - There are no PEP8 issues in the file [`pandas/tests/series/test_duplicates.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/series/test_duplicates.py) !

 - There are no PEP8 issues in the file [`pandas/tests/test_algos.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/test_algos.py) !

 - There are no PEP8 issues in the file [`pandas/tests/test_multilevel.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/test_multilevel.py) !

 - There are no PEP8 issues in the file [`pandas/tests/util/test_hashing.py`](https://github.com/topper-123/pandas/blob/a850e5f83a0cf84e413ba698c894dc6a321c0426/pandas/tests/util/test_hashing.py) !


Looks like some related test failures though.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23294?src=pr&el=h1) Report
> Merging [#23294](https://codecov.io/gh/pandas-dev/pandas/pull/23294?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/5a0c91e5a5bc61c71da08d6968d973255829678d?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23294/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23294?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #23294   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files         169      169           
  Lines       50897    50897           
=======================================
  Hits        46940    46940           
  Misses       3957     3957
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.65% <ø> (ø)` | :arrow_up: |
| #single | `42.29% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23294?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23294?src=pr&el=footer). Last update [5a0c91e...92bbf56](https://codecov.io/gh/pandas-dev/pandas/pull/23294?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

The failure issue was that ``Index.hasnans`` sometimes returns a python boolen and sometimes a numpy boolean.

As this PR mainly concerns itself with ``is_monotonoc*`` and ``is_unique``, I've simply removed the few changes to ``hasnans`` tests from this PR. I will later submit a seperate PR regarding hasnans, so as to keep things clean.

thanks!