Skip to content

test_formats.py not parametrized #20426

Closed
@minggli

Description

@minggli

Code Sample, a copy-pastable example if possible

def test_repr():
    assert (repr(Timedelta(10, unit='d')) ==
            "Timedelta('10 days 00:00:00')")
    assert (repr(Timedelta(10, unit='s')) ==
            "Timedelta('0 days 00:00:10')")
    assert (repr(Timedelta(10, unit='ms')) ==
            "Timedelta('0 days 00:00:00.010000')")
    assert (repr(Timedelta(-10, unit='ms')) ==
            "Timedelta('-1 days +23:59:59.990000')")

Problem description

should be parameterised.

Expected Output

Output of pd.show_versions()

INSTALLED VERSIONS

commit: 01882ba
python: 3.6.4.final.0
python-bits: 64
OS: Darwin
OS-release: 17.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8

pandas: 0.23.0.dev0+657.g01882ba5b
pytest: 3.3.2
pip: 9.0.1
setuptools: 38.4.0
Cython: 0.27.3
numpy: 1.14.0
scipy: 1.0.0
pyarrow: 0.8.0
xarray: 0.10.0
IPython: 6.2.1
sphinx: 1.6.6
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: 1.5.1
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: 0.4.0
matplotlib: 2.1.2
openpyxl: 2.5.0
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.2
lxml: 4.1.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.2
pymysql: 0.8.0
psycopg2: None
jinja2: 2.10
s3fs: 0.1.2
fastparquet: 0.1.4
pandas_gbq: None
pandas_datareader: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Testingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions