-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Non-bugfix about zero & wide definition conflicts (again!) (#110)
In this update to update-tables.py, 04d6d90 I wrote, > `verify-table-integrity.py` exercises a "bug" of duplicated tables that has no effect, because wcswidth() first checks for zero-width, and that is preferred in cases of conflict. This PR also resolves that error of duplication. In that change I used method [set.discard()](https://docs.python.org/3/library/stdtypes.html#frozenset.discard) in error, the discard method takes a single item as an argument, while I was providing using a whole set and so it had no effect. Instead, I now use [set.difference()](https://docs.python.org/3/library/stdtypes.html#frozenset.difference) to re-assign the value. Also, - the `category_codes` argument has been removed in update-tables.py, it is not used. - `verify-table-integrity.py` has been improved to show both range values in conflict - `verify-table-integrity.py` now included as a unit test for a single version of python (3.12) - new unit test about conflicting wide & zero values. This demonstrates that the update to table_wide.py has no effect, as these tests succeed before and after change to table_wide.py.
- Loading branch information
Showing
6 changed files
with
160 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
Executes verify-table-integrity.py as a unit test. | ||
""" | ||
import os | ||
import sys | ||
import subprocess | ||
|
||
import pytest | ||
|
||
@pytest.mark.skipif(sys.version_info[:2] != (3, 12), reason='Test only with a single version of python') | ||
def test_verify_table_integrity(): | ||
subprocess.check_output([sys.executable, os.path.join(os.path.dirname(__file__), | ||
os.path.pardir, | ||
'bin', | ||
'verify-table-integrity.py')]) |
Oops, something went wrong.