Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] test_predefined_character_classes failed with seed 4 #9246

Closed
Tracked by #9241
thirtiseven opened this issue Sep 18, 2023 · 2 comments · Fixed by #9280
Closed
Tracked by #9241

[BUG] test_predefined_character_classes failed with seed 4 #9246

thirtiseven opened this issue Sep 18, 2023 · 2 comments · Fixed by #9280
Assignees
Labels
bug Something isn't working

Comments

@thirtiseven
Copy link
Collaborator

thirtiseven commented Sep 18, 2023

Changing seed to some other values like 4 will fail test_predefined_character_classes:

def test_predefined_character_classes():
    gen = mk_str_gen('[a-zA-Z]{0,2}[\r\n!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~]{0,2}[0-9]{0,2}')
    assert_gpu_and_cpu_are_equal_collect(
        lambda spark: unary_op_df(spark, gen, seed=4).selectExpr(
            'regexp_replace(a, "\\\\p{Lower}", "x")',
            'regexp_replace(a, "\\\\p{Upper}", "x")',
            'regexp_replace(a, "\\\\p{ASCII}", "x")',
            'regexp_replace(a, "\\\\p{Alpha}", "x")',
            'regexp_replace(a, "\\\\p{Digit}", "x")',
            'regexp_replace(a, "\\\\p{Alnum}", "x")',
            'regexp_replace(a, "\\\\p{Punct}", "x")',
            'regexp_replace(a, "\\\\p{Graph}", "x")',
            'regexp_replace(a, "\\\\p{Print}", "x")',
            'regexp_replace(a, "\\\\p{Blank}", "x")',
            'regexp_replace(a, "\\\\p{Cntrl}", "x")',
            'regexp_replace(a, "\\\\p{XDigit}", "x")',
            'regexp_replace(a, "\\\\p{Space}", "x")',
            'regexp_replace(a, "\\\\P{Lower}", "x")',
            'regexp_replace(a, "\\\\P{Upper}", "x")',
            'regexp_replace(a, "\\\\P{ASCII}", "x")',
            'regexp_replace(a, "\\\\P{Alpha}", "x")',
            'regexp_replace(a, "\\\\P{Digit}", "x")',
            'regexp_replace(a, "\\\\P{Alnum}", "x")',
            'regexp_replace(a, "\\\\P{Punct}", "x")',
            'regexp_replace(a, "\\\\P{Graph}", "x")',
            'regexp_replace(a, "\\\\P{Print}", "x")',
            'regexp_replace(a, "\\\\P{Blank}", "x")',
            'regexp_replace(a, "\\\\P{Cntrl}", "x")',
            'regexp_replace(a, "\\\\P{XDigit}", "x")',
            'regexp_replace(a, "\\\\P{Space}", "x")',
        ),
        conf=_regexp_conf)

log:

______________________________________________________________ test_predefined_character_classes ______________________________________________________________
[gw0] linux -- Python 3.8.3 /home/haoyangl/.pyenv/versions/3.8.3/bin/python

    def test_predefined_character_classes():
        gen = mk_str_gen('[a-zA-Z]{0,2}[\r\n!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~]{0,2}[0-9]{0,2}')
>       assert_gpu_and_cpu_are_equal_collect(
            lambda spark: unary_op_df(spark, gen, seed=4).selectExpr(
                'regexp_replace(a, "\\\\p{Lower}", "x")',
                'regexp_replace(a, "\\\\p{Upper}", "x")',
                'regexp_replace(a, "\\\\p{ASCII}", "x")',
                'regexp_replace(a, "\\\\p{Alpha}", "x")',
                'regexp_replace(a, "\\\\p{Digit}", "x")',
                'regexp_replace(a, "\\\\p{Alnum}", "x")',
                'regexp_replace(a, "\\\\p{Punct}", "x")',
                'regexp_replace(a, "\\\\p{Graph}", "x")',
                'regexp_replace(a, "\\\\p{Print}", "x")',
                'regexp_replace(a, "\\\\p{Blank}", "x")',
                'regexp_replace(a, "\\\\p{Cntrl}", "x")',
                'regexp_replace(a, "\\\\p{XDigit}", "x")',
                'regexp_replace(a, "\\\\p{Space}", "x")',
                'regexp_replace(a, "\\\\P{Lower}", "x")',
                'regexp_replace(a, "\\\\P{Upper}", "x")',
                'regexp_replace(a, "\\\\P{ASCII}", "x")',
                'regexp_replace(a, "\\\\P{Alpha}", "x")',
                'regexp_replace(a, "\\\\P{Digit}", "x")',
                'regexp_replace(a, "\\\\P{Alnum}", "x")',
                'regexp_replace(a, "\\\\P{Punct}", "x")',
                'regexp_replace(a, "\\\\P{Graph}", "x")',
                'regexp_replace(a, "\\\\P{Print}", "x")',
                'regexp_replace(a, "\\\\P{Blank}", "x")',
                'regexp_replace(a, "\\\\P{Cntrl}", "x")',
                'regexp_replace(a, "\\\\P{XDigit}", "x")',
                'regexp_replace(a, "\\\\P{Space}", "x")',
            ),
            conf=_regexp_conf)

../../src/main/python/regexp_test.py:673:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../src/main/python/asserts.py:566: in assert_gpu_and_cpu_are_equal_collect
    _assert_gpu_and_cpu_are_equal(func, 'COLLECT', conf=conf, is_cpu_first=is_cpu_first)
../../src/main/python/asserts.py:497: in _assert_gpu_and_cpu_are_equal
    assert_equal(from_cpu, from_gpu)
../../src/main/python/asserts.py:107: in assert_equal
    _assert_equal(cpu, gpu, float_check=get_float_check(), path=[])
../../src/main/python/asserts.py:43: in _assert_equal
    _assert_equal(cpu[index], gpu[index], float_check, path + [index])
../../src/main/python/asserts.py:36: in _assert_equal
    _assert_equal(cpu[field], gpu[field], float_check, path + [field])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cpu = 'ÝM½¨x\x97Ð\x0fxö', gpu = 'ÝM½¨\\\x97Ð\x0fxö', float_check = <function get_float_check.<locals>.<lambda> at 0x7fa0bb258820>
path = [1261, 'regexp_replace(a, \\p{Punct}, x, 1)']

    def _assert_equal(cpu, gpu, float_check, path):
        t = type(cpu)
        if (t is Row):
            assert len(cpu) == len(gpu), "CPU and GPU row have different lengths at {} CPU: {} GPU: {}".format(path, len(cpu), len(gpu))
            if hasattr(cpu, "__fields__") and hasattr(gpu, "__fields__"):
                assert cpu.__fields__ == gpu.__fields__, "CPU and GPU row have different fields at {} CPU: {} GPU: {}".format(path, cpu.__fields__, gpu.__fields__)
                for field in cpu.__fields__:
                    _assert_equal(cpu[field], gpu[field], float_check, path + [field])
            else:
                for index in range(len(cpu)):
                    _assert_equal(cpu[index], gpu[index], float_check, path + [index])
        elif (t is list):
            assert len(cpu) == len(gpu), "CPU and GPU list have different lengths at {} CPU: {} GPU: {}".format(path, len(cpu), len(gpu))
            for index in range(len(cpu)):
                _assert_equal(cpu[index], gpu[index], float_check, path + [index])
        elif (t is tuple):
            assert len(cpu) == len(gpu), "CPU and GPU list have different lengths at {} CPU: {} GPU: {}".format(path, len(cpu), len(gpu))
            for index in range(len(cpu)):
                _assert_equal(cpu[index], gpu[index], float_check, path + [index])
        elif (t is pytypes.GeneratorType):
            index = 0
            # generator has no zip :( so we have to do this the hard way
            done = False
            while not done:
                sub_cpu = None
                sub_gpu = None
                try:
                    sub_cpu = next(cpu)
                except StopIteration:
                    done = True

                try:
                    sub_gpu = next(gpu)
                except StopIteration:
                    done = True

                if done:
                    assert sub_cpu == sub_gpu and sub_cpu == None, "CPU and GPU generators have different lengths at {}".format(path)
                else:
                    _assert_equal(sub_cpu, sub_gpu, float_check, path + [index])

                index = index + 1
        elif (t is dict):
            # The order of key/values is not guaranteed in python dicts, nor are they guaranteed by Spark
            # so sort the items to do our best with ignoring the order of dicts
            cpu_items = list(cpu.items()).sort(key=_RowCmp)
            gpu_items = list(gpu.items()).sort(key=_RowCmp)
            _assert_equal(cpu_items, gpu_items, float_check, path + ["map"])
        elif (t is int):
            assert cpu == gpu, "GPU and CPU int values are different at {}".format(path)
        elif (t is float):
            if (math.isnan(cpu)):
                assert math.isnan(gpu), "GPU and CPU float values are different at {}".format(path)
            else:
                assert float_check(cpu, gpu), "GPU and CPU float values are different {}".format(path)
        elif isinstance(cpu, str):
>           assert cpu == gpu, "GPU and CPU string values are different at {}".format(path)
E           AssertionError: GPU and CPU string values are different at [1261, 'regexp_replace(a, \\p{Punct}, x, 1)']

../../src/main/python/asserts.py:85: AssertionError
-------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------
### CPU RUN ###
### GPU RUN ###
### COLLECT: GPU TOOK 0.5829105377197266 CPU TOOK 3.3358943462371826 ###
--- CPU OUTPUT
+++ GPU OUTPUT
@@ -1259,7 +1259,7 @@
 Row(regexp_replace(a, \p{Lower}, x, 1)='xR<`40', regexp_replace(a, \p{Upper}, x, 1)='tx<`40', regexp_replace(a, \p{ASCII}, x, 1)='xxxxxx', regexp_replace(a, \p{Alpha}, x, 1)='xx<`40', regexp_replace(a, \p{Digit}, x, 1)='tR<`xx', regexp_replace(a, \p{Alnum}, x, 1)='xx<`xx', regexp_replace(a, \p{Punct}, x, 1)='tRxx40', regexp_replace(a, \p{Graph}, x, 1)='xxxxxx', regexp_replace(a, \p{Print}, x, 1)='xxxxxx', regexp_replace(a, \p{Blank}, x, 1)='tR<`40', regexp_replace(a, \p{Cntrl}, x, 1)='tR<`40', regexp_replace(a, \p{XDigit}, x, 1)='tR<`xx', regexp_replace(a, \p{Space}, x, 1)='tR<`40', regexp_replace(a, \P{Lower}, x, 1)='txxxxx', regexp_replace(a, \P{Upper}, x, 1)='xRxxxx', regexp_replace(a, \P{ASCII}, x, 1)='tR<`40', regexp_replace(a, \P{Alpha}, x, 1)='tRxxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxx40', regexp_replace(a, \P{Alnum}, x, 1)='tRxx40', regexp_replace(a, \P{Punct}, x, 1)='xx<`xx', regexp_replace(a, \P{Graph}, x, 1)='tR<`40', regexp_replace(a, \P{Print}, x, 1)='tR<`40', regexp_replace(a, \P{Blank}, x, 1)='xxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxx', regexp_replace(a, \P{XDigit}, x, 1)='xxxx40', regexp_replace(a, \P{Space}, x, 1)='xxxxxx')
 Row(regexp_replace(a, \p{Lower}, x, 1)='MW?{04', regexp_replace(a, \p{Upper}, x, 1)='xx?{04', regexp_replace(a, \p{ASCII}, x, 1)='xxxxxx', regexp_replace(a, \p{Alpha}, x, 1)='xx?{04', regexp_replace(a, \p{Digit}, x, 1)='MW?{xx', regexp_replace(a, \p{Alnum}, x, 1)='xx?{xx', regexp_replace(a, \p{Punct}, x, 1)='MWxx04', regexp_replace(a, \p{Graph}, x, 1)='xxxxxx', regexp_replace(a, \p{Print}, x, 1)='xxxxxx', regexp_replace(a, \p{Blank}, x, 1)='MW?{04', regexp_replace(a, \p{Cntrl}, x, 1)='MW?{04', regexp_replace(a, \p{XDigit}, x, 1)='MW?{xx', regexp_replace(a, \p{Space}, x, 1)='MW?{04', regexp_replace(a, \P{Lower}, x, 1)='xxxxxx', regexp_replace(a, \P{Upper}, x, 1)='MWxxxx', regexp_replace(a, \P{ASCII}, x, 1)='MW?{04', regexp_replace(a, \P{Alpha}, x, 1)='MWxxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxx04', regexp_replace(a, \P{Alnum}, x, 1)='MWxx04', regexp_replace(a, \P{Punct}, x, 1)='xx?{xx', regexp_replace(a, \P{Graph}, x, 1)='MW?{04', regexp_replace(a, \P{Print}, x, 1)='MW?{04', regexp_replace(a, \P{Blank}, x, 1)='xxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxx', regexp_replace(a, \P{XDigit}, x, 1)='xxxx04', regexp_replace(a, \P{Space}, x, 1)='xxxxxx')
 Row(regexp_replace(a, \p{Lower}, x, 1)='xx!{50', regexp_replace(a, \p{Upper}, x, 1)='ma!{50', regexp_replace(a, \p{ASCII}, x, 1)='xxxxxx', regexp_replace(a, \p{Alpha}, x, 1)='xx!{50', regexp_replace(a, \p{Digit}, x, 1)='ma!{xx', regexp_replace(a, \p{Alnum}, x, 1)='xx!{xx', regexp_replace(a, \p{Punct}, x, 1)='maxx50', regexp_replace(a, \p{Graph}, x, 1)='xxxxxx', regexp_replace(a, \p{Print}, x, 1)='xxxxxx', regexp_replace(a, \p{Blank}, x, 1)='ma!{50', regexp_replace(a, \p{Cntrl}, x, 1)='ma!{50', regexp_replace(a, \p{XDigit}, x, 1)='mx!{xx', regexp_replace(a, \p{Space}, x, 1)='ma!{50', regexp_replace(a, \P{Lower}, x, 1)='maxxxx', regexp_replace(a, \P{Upper}, x, 1)='xxxxxx', regexp_replace(a, \P{ASCII}, x, 1)='ma!{50', regexp_replace(a, \P{Alpha}, x, 1)='maxxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxx50', regexp_replace(a, \P{Alnum}, x, 1)='maxx50', regexp_replace(a, \P{Punct}, x, 1)='xx!{xx', regexp_replace(a, \P{Graph}, x, 1)='ma!{50', regexp_replace(a, \P{Print}, x, 1)='ma!{50', regexp_replace(a, \P{Blank}, x, 1)='xxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxx', regexp_replace(a, \P{XDigit}, x, 1)='xaxx50', regexp_replace(a, \P{Space}, x, 1)='xxxxxx')
-Row(regexp_replace(a, \p{Lower}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Upper}, x, 1)='Ýx½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{ASCII}, x, 1)='Ýx½¨x\x97Ðxxö', regexp_replace(a, \p{Alpha}, x, 1)='Ýx½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Digit}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Alnum}, x, 1)='Ýx½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Punct}, x, 1)='ÝM½¨x\x97Ð\x0fxö', regexp_replace(a, \p{Graph}, x, 1)='Ýx½¨x\x97Ð\x0fxö', regexp_replace(a, \p{Print}, x, 1)='Ýx½¨x\x97Ð\x0fxö', regexp_replace(a, \p{Blank}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Cntrl}, x, 1)='ÝM½¨\\\x97Ðx]ö', regexp_replace(a, \p{XDigit}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Space}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \P{Lower}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Upper}, x, 1)='xMxxxxxxxx', regexp_replace(a, \P{ASCII}, x, 1)='xMxx\\xx\x0f]x', regexp_replace(a, \P{Alpha}, x, 1)='xMxxxxxxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Alnum}, x, 1)='xMxxxxxxxx', regexp_replace(a, \P{Punct}, x, 1)='xxxx\\xxx]x', regexp_replace(a, \P{Graph}, x, 1)='xMxx\\xxx]x', regexp_replace(a, \P{Print}, x, 1)='xMxx\\xxx]x', regexp_replace(a, \P{Blank}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxxx\x0fxx', regexp_replace(a, \P{XDigit}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Space}, x, 1)='xxxxxxxxxx')
+Row(regexp_replace(a, \p{Lower}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Upper}, x, 1)='Ýx½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{ASCII}, x, 1)='Ýx½¨x\x97Ðxxö', regexp_replace(a, \p{Alpha}, x, 1)='Ýx½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Digit}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Alnum}, x, 1)='Ýx½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Punct}, x, 1)='ÝM½¨\\\x97Ð\x0fxö', regexp_replace(a, \p{Graph}, x, 1)='Ýx½¨\\\x97Ð\x0fxö', regexp_replace(a, \p{Print}, x, 1)='Ýx½¨\\\x97Ð\x0fxö', regexp_replace(a, \p{Blank}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Cntrl}, x, 1)='ÝM½¨\\\x97Ðx]ö', regexp_replace(a, \p{XDigit}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \p{Space}, x, 1)='ÝM½¨\\\x97Ð\x0f]ö', regexp_replace(a, \P{Lower}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Upper}, x, 1)='xMxxxxxxxx', regexp_replace(a, \P{ASCII}, x, 1)='xMxx\\xx\x0f]x', regexp_replace(a, \P{Alpha}, x, 1)='xMxxxxxxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Alnum}, x, 1)='xMxxxxxxxx', regexp_replace(a, \P{Punct}, x, 1)='xxxxxxxx]x', regexp_replace(a, \P{Graph}, x, 1)='xMxxxxxx]x', regexp_replace(a, \P{Print}, x, 1)='xMxxxxxx]x', regexp_replace(a, \P{Blank}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxxx\x0fxx', regexp_replace(a, \P{XDigit}, x, 1)='xxxxxxxxxx', regexp_replace(a, \P{Space}, x, 1)='xxxxxxxxxx')
 Row(regexp_replace(a, \p{Lower}, x, 1)='YE.[64', regexp_replace(a, \p{Upper}, x, 1)='xx.[64', regexp_replace(a, \p{ASCII}, x, 1)='xxxxxx', regexp_replace(a, \p{Alpha}, x, 1)='xx.[64', regexp_replace(a, \p{Digit}, x, 1)='YE.[xx', regexp_replace(a, \p{Alnum}, x, 1)='xx.[xx', regexp_replace(a, \p{Punct}, x, 1)='YExx64', regexp_replace(a, \p{Graph}, x, 1)='xxxxxx', regexp_replace(a, \p{Print}, x, 1)='xxxxxx', regexp_replace(a, \p{Blank}, x, 1)='YE.[64', regexp_replace(a, \p{Cntrl}, x, 1)='YE.[64', regexp_replace(a, \p{XDigit}, x, 1)='Yx.[xx', regexp_replace(a, \p{Space}, x, 1)='YE.[64', regexp_replace(a, \P{Lower}, x, 1)='xxxxxx', regexp_replace(a, \P{Upper}, x, 1)='YExxxx', regexp_replace(a, \P{ASCII}, x, 1)='YE.[64', regexp_replace(a, \P{Alpha}, x, 1)='YExxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxx64', regexp_replace(a, \P{Alnum}, x, 1)='YExx64', regexp_replace(a, \P{Punct}, x, 1)='xx.[xx', regexp_replace(a, \P{Graph}, x, 1)='YE.[64', regexp_replace(a, \P{Print}, x, 1)='YE.[64', regexp_replace(a, \P{Blank}, x, 1)='xxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxx', regexp_replace(a, \P{XDigit}, x, 1)='xExx64', regexp_replace(a, \P{Space}, x, 1)='xxxxxx')
 Row(regexp_replace(a, \p{Lower}, x, 1)='xW@`88', regexp_replace(a, \p{Upper}, x, 1)='ex@`88', regexp_replace(a, \p{ASCII}, x, 1)='xxxxxx', regexp_replace(a, \p{Alpha}, x, 1)='xx@`88', regexp_replace(a, \p{Digit}, x, 1)='eW@`xx', regexp_replace(a, \p{Alnum}, x, 1)='xx@`xx', regexp_replace(a, \p{Punct}, x, 1)='eWxx88', regexp_replace(a, \p{Graph}, x, 1)='xxxxxx', regexp_replace(a, \p{Print}, x, 1)='xxxxxx', regexp_replace(a, \p{Blank}, x, 1)='eW@`88', regexp_replace(a, \p{Cntrl}, x, 1)='eW@`88', regexp_replace(a, \p{XDigit}, x, 1)='xW@`xx', regexp_replace(a, \p{Space}, x, 1)='eW@`88', regexp_replace(a, \P{Lower}, x, 1)='exxxxx', regexp_replace(a, \P{Upper}, x, 1)='xWxxxx', regexp_replace(a, \P{ASCII}, x, 1)='eW@`88', regexp_replace(a, \P{Alpha}, x, 1)='eWxxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxx88', regexp_replace(a, \P{Alnum}, x, 1)='eWxx88', regexp_replace(a, \P{Punct}, x, 1)='xx@`xx', regexp_replace(a, \P{Graph}, x, 1)='eW@`88', regexp_replace(a, \P{Print}, x, 1)='eW@`88', regexp_replace(a, \P{Blank}, x, 1)='xxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxx', regexp_replace(a, \P{XDigit}, x, 1)='exxx88', regexp_replace(a, \P{Space}, x, 1)='xxxxxx')
 Row(regexp_replace(a, \p{Lower}, x, 1)='Bx{^57', regexp_replace(a, \p{Upper}, x, 1)='xg{^57', regexp_replace(a, \p{ASCII}, x, 1)='xxxxxx', regexp_replace(a, \p{Alpha}, x, 1)='xx{^57', regexp_replace(a, \p{Digit}, x, 1)='Bg{^xx', regexp_replace(a, \p{Alnum}, x, 1)='xx{^xx', regexp_replace(a, \p{Punct}, x, 1)='Bgxx57', regexp_replace(a, \p{Graph}, x, 1)='xxxxxx', regexp_replace(a, \p{Print}, x, 1)='xxxxxx', regexp_replace(a, \p{Blank}, x, 1)='Bg{^57', regexp_replace(a, \p{Cntrl}, x, 1)='Bg{^57', regexp_replace(a, \p{XDigit}, x, 1)='xg{^xx', regexp_replace(a, \p{Space}, x, 1)='Bg{^57', regexp_replace(a, \P{Lower}, x, 1)='xgxxxx', regexp_replace(a, \P{Upper}, x, 1)='Bxxxxx', regexp_replace(a, \P{ASCII}, x, 1)='Bg{^57', regexp_replace(a, \P{Alpha}, x, 1)='Bgxxxx', regexp_replace(a, \P{Digit}, x, 1)='xxxx57', regexp_replace(a, \P{Alnum}, x, 1)='Bgxx57', regexp_replace(a, \P{Punct}, x, 1)='xx{^xx', regexp_replace(a, \P{Graph}, x, 1)='Bg{^57', regexp_replace(a, \P{Print}, x, 1)='Bg{^57', regexp_replace(a, \P{Blank}, x, 1)='xxxxxx', regexp_replace(a, \P{Cntrl}, x, 1)='xxxxxx', regexp_replace(a, \P{XDigit}, x, 1)='Bxxx57', regexp_replace(a, \P{Space}, x, 1)='xxxxxx')
@revans2
Copy link
Collaborator

revans2 commented Sep 19, 2023

This one looks like a real problem too and I need to dig into it a bit more.

@revans2 revans2 self-assigned this Sep 19, 2023
@revans2
Copy link
Collaborator

revans2 commented Sep 20, 2023

It looks like we tried to include \ in the list of characters for Punct, but failed to escape it when we generated the character set, so it ended up just escaping another character instead.

@sameerz sameerz added the bug Something isn't working label Oct 13, 2023
@pxLi pxLi changed the title test_predefined_character_classes failed with seed 4 [BUG] test_predefined_character_classes failed with seed 4 Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants