From 63b7ae4ccb69aff524580d3e4d114f1c54787713 Mon Sep 17 00:00:00 2001 From: Nathan TeBlunthuis Date: Sat, 5 Jul 2025 11:37:58 -0700 Subject: [PATCH] add test and disable debugging symbols. --- setup.py | 4 ++-- test/test_pywikidiff2.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ed95bef..c232f1f 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,8 @@ my_extension = setuptools.Extension( "pywikidiff2", sources=cpp_sources, include_dirs=[], - extra_compile_args=["-Wall", "-std=c++17", "-fPIC","-lthai","-lstdc++","-O0"], - extra_link_args=["-lthai", "-lstdc++","-fPIC","-g","-O0"], + extra_compile_args=["-Wall", "-std=c++17", "-fPIC","-lthai","-lstdc++"], + extra_link_args=["-lthai", "-lstdc++","-fPIC"], language="c++", ) diff --git a/test/test_pywikidiff2.py b/test/test_pywikidiff2.py index 50116bf..99e07c5 100644 --- a/test/test_pywikidiff2.py +++ b/test/test_pywikidiff2.py @@ -19,9 +19,12 @@ res = obj.inline_json_diff(open("test/err_last_text",'r').read(), open("test/err_text",'r').read(), numContextLines=10000) +assert obj.num_context_lines() == 10000 + res = obj.inline_json_diff("", open("test/1295229484",'r').read(), numContextLines=1000) +assert obj.num_context_lines() == 1000 res = obj.inline_json_diff(open("test/1285792388",'r').read(), open("test/1295229484",'r').read(),