Skip to content

Commit

Permalink
FIXES #21: Avoid weird problems w/ tests/test_parse.py
Browse files Browse the repository at this point in the history
* "test_parse.py" tests only the "parse" module
* ENSURE: The internally embedded "parse" module ("parse_type.parse")
  is used per default.

WORKAROUND (before this fix):

* Use "pip install -U parse" to ensure "parse v1.19.1" or newer
  is installed.

 Please enter the commit message for your changes. Lines starting
  • Loading branch information
jenisys committed Jul 4, 2023
1 parent 9e2d0a4 commit 014f1a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ GOALS:
* Drop support for Python 2.7
* Support Python >= 3.7 (probably)

Version: 0.6.2 (UNRELEASED)
-------------------------------------------------------------------------------

FIXES:

* #21: tests/test_parse.py tests ``parse_type.parse`` (per default).
REASON: Using for older installed ``parse`` module may cause weird problems.
RELATED TO: ``parse v1.19.1`` (behavior changed compared to ``v1.19.0``)


Version: 0.6.1 (2023-07-02)
-------------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@

# -- EXTENSION:
import os
PARSE_MODULE = os.environ.get("PARSE_TYPE_PARSE_MODULE", "parse")
PARSE_MODULE = os.environ.get("PARSE_TYPE_PARSE_MODULE", "parse_type")
if PARSE_MODULE.startswith("parse_type"):
# -- USE VENDOR MODULE: parse_type.parse (probably older that original)
# -- USE EMBEDDED PARSE MODULE: parse_type.parse
# HINT: Has either same version or is older than original module.
from parse_type import parse
else:
# -- USE ORIGINAL MODULE: parse
Expand Down

0 comments on commit 014f1a2

Please sign in to comment.