From 826f7eaabed9109df542adeef77a8cae0bb61fac Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Wed, 6 May 2020 17:17:03 +0300 Subject: [PATCH 1/2] Correct confusing name and fix typos The documentation is about the `testfxtures` module; remove confusing references to the class-like `TestFixtures` name. Also fix the completely wrong references to `TestFixtures`. --- docs/datetime.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/datetime.txt b/docs/datetime.txt index bc1cd515..d26a9ae8 100644 --- a/docs/datetime.txt +++ b/docs/datetime.txt @@ -6,13 +6,13 @@ Mocking dates and times Testing code that involves dates and times or which has behaviour dependent on the date or time it is executed at has historically been tricky. Mocking lets you perform tests on this type of code and -TestFixtures provides three specialised mock objects to help with +testfixtures provides three specialised mock objects to help with this. Dates ~~~~~ -TestFixtures provides the :func:`~testfixtures.test_date` function +The testfixtures module provides the :func:`~testfixtures.test_date` function that returns a subclass of :class:`datetime.date` with a :meth:`~datetime.date.today` method that will return a consistent sequence of dates each time it is called. @@ -99,7 +99,7 @@ this will be the set date plus the ``delta`` in effect: Datetimes ~~~~~~~~~ -TextFixtures provides the :func:`~testfixtures.test_datetime` +The testfixtures module provides the :func:`~testfixtures.test_datetime` function that returns a subclass of :class:`datetime.datetime` with a :meth:`~datetime.datetime.now` method that will return a consistent sequence of :obj:`~datetime.datetime` objects each time @@ -294,7 +294,7 @@ Likewise, :meth:`~tdatetime.add` behaves the same way: Times ~~~~~ -TextFixtures provides the :func:`~testfixtures.test_time` +The testfixtures module provides the :func:`~testfixtures.test_time` function that, when called, returns a replacement for the :func:`time.time` function. From f0e01cb864ef767881da5b5506e3b2928f8b34a8 Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Wed, 6 May 2020 21:34:57 +0300 Subject: [PATCH 2/2] Change module references to package --- docs/datetime.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/datetime.txt b/docs/datetime.txt index d26a9ae8..ba222b0a 100644 --- a/docs/datetime.txt +++ b/docs/datetime.txt @@ -12,7 +12,7 @@ this. Dates ~~~~~ -The testfixtures module provides the :func:`~testfixtures.test_date` function +The testfixtures package provides the :func:`~testfixtures.test_date` function that returns a subclass of :class:`datetime.date` with a :meth:`~datetime.date.today` method that will return a consistent sequence of dates each time it is called. @@ -99,7 +99,7 @@ this will be the set date plus the ``delta`` in effect: Datetimes ~~~~~~~~~ -The testfixtures module provides the :func:`~testfixtures.test_datetime` +The testfixtures package provides the :func:`~testfixtures.test_datetime` function that returns a subclass of :class:`datetime.datetime` with a :meth:`~datetime.datetime.now` method that will return a consistent sequence of :obj:`~datetime.datetime` objects each time @@ -294,7 +294,7 @@ Likewise, :meth:`~tdatetime.add` behaves the same way: Times ~~~~~ -The testfixtures module provides the :func:`~testfixtures.test_time` +The testfixtures package provides the :func:`~testfixtures.test_time` function that, when called, returns a replacement for the :func:`time.time` function.