diff --git a/tdvt/CHANGELOG.md b/tdvt/CHANGELOG.md index cb8e40b7..3ba6e93a 100644 --- a/tdvt/CHANGELOG.md +++ b/tdvt/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.13.7] - 2024-03-12 +- Fix regex that changes tds files. + +## [2.13.6] - 2024-01-25 +- Add string.space.empty test. + +## [2.13.5] - 2024-01-11 +- Align expected files with datatype handling ## [2.13.4] - 2023-12-20 - Some nits from making the release PR. diff --git a/tdvt/tdvt/logicaltests/expected/connection_test/expected.setup.staples.connection.test.xml b/tdvt/tdvt/logicaltests/expected/connection_test/expected.setup.staples.connection.test.xml index f721d7a3..4d96d6af 100644 --- a/tdvt/tdvt/logicaltests/expected/connection_test/expected.setup.staples.connection.test.xml +++ b/tdvt/tdvt/logicaltests/expected/connection_test/expected.setup.staples.connection.test.xml @@ -1,78 +1,78 @@ - - - - - - SELECT "Staples"."Discount" AS "Ship Priority" FROM "Staples" GROUP BY 1 - - 85.000 - - - [Staples.postgres].[Ship Priority] - - - "0" - - - "0.01" - - - "0.02" - - - "0.03" - - - "0.04" - - - "0.05" - - - "0.06" - - - "0.07" - - - "0.08" - - - "0.09" - - - "0.1" - - - "0.11" - - - "0.12" - - - "0.13" - - - "0.15" - - - "0.21" - - - "0.24" - - - "0.27" - - - "0.3" - - - "0.36" - - - "0.39" - -
-
-
+ + + + + + SELECT "Staples"."Discount" AS "Ship Priority" FROM "Staples" GROUP BY 1 + + 85.000 + + + [Staples.postgres].[Ship Priority] + + + 0.0 + + + 0.01 + + + 0.02 + + + 0.03 + + + 0.04 + + + 0.05 + + + 0.06 + + + 0.07 + + + 0.08 + + + 0.09 + + + 0.1 + + + 0.11 + + + 0.12 + + + 0.13 + + + 0.15 + + + 0.21 + + + 0.24 + + + 0.27 + + + 0.3 + + + 0.36 + + + 0.39 + +
+
+
diff --git a/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.9_Fixed as Dimension.xml b/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.9_Fixed as Dimension.xml index 9458760b..bc9981f7 100644 --- a/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.9_Fixed as Dimension.xml +++ b/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.9_Fixed as Dimension.xml @@ -9,212 +9,212 @@ [Staples.teradata].[yr:Order Date:ok] - 143086.0 + 143086 7 1997 - 155398.0 + 155398 6 2000 - 171196.0 + 171196 7 2000 - 203969.0 + 203969 7 2002 - 210031.0 + 210031 7 1999 - 229542.0 + 229542 7 2001 - 250933.0 + 250933 6 1999 - 270968.0 + 270968 6 2002 - 272984.0 + 272984 6 1997 - 275541.0 + 275541 7 1998 - 292277.0 + 292277 6 2001 - 333289.0 + 333289 6 1998 - 602266.0 + 602266 5 2001 - 602510.0 + 602510 5 2000 - 631772.0 + 631772 5 1999 - 661241.0 + 661241 5 1997 - 711393.0 + 711393 5 1998 - 740353.0 + 740353 5 2002 - 1589284.0 + 1589284 4 2001 - 1639958.0 + 1639958 4 2002 - 1658149.0 + 1658149 4 1998 - 1681972.0 + 1681972 4 1997 - 1766892.0 + 1766892 4 2000 - 1847329.0 + 1847329 4 1999 - 2581528.0 + 2581528 3 2002 - 2817285.0 + 2817285 3 1997 - 2903749.0 + 2903749 3 2000 - 2936721.0 + 2936721 3 1999 - 2983885.0 + 2983885 3 1998 - 3106220.0 + 3106220 3 2001 - 4820443.0 + 4820443 1 2002 - 4950468.0 + 4950468 1 2000 - 4953826.0 + 4953826 1 1999 - 4985164.0 + 4985164 1 2001 - 5085197.0 + 5085197 1 1998 - 5345654.0 + 5345654 2 2002 - 5362879.0 + 5362879 1 1997 - 5474899.0 + 5474899 2 1997 - 5489919.0 + 5489919 2 2001 - 5626388.0 + 5626388 2 2000 - 5852590.0 + 5852590 2 1999 - 6468769.0 + 6468769 2 1998 diff --git a/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.calc.1.TopN.xml b/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.calc.1.TopN.xml index 20ca3abd..00f62df9 100644 --- a/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.calc.1.TopN.xml +++ b/tdvt/tdvt/logicaltests/expected/lod/expected.setup.lod.calc.1.TopN.xml @@ -9,71 +9,71 @@ "APPLIANCES" - 3211255.0 + 3211255 "BINDERS AND BINDER ACCESSORIES" - 3486043.0 + 3486043 "BOOKCASES" - 3192047.0 + 3192047 "CHAIRS & CHAIRMATS" - 6394825.0 + 6394825 "COMPUTER PERIPHERALS" - 3181279.0 + 3181279 "COPIERS AND FAX" - 3937480.0 + 3937480 "ENVELOPES" - 499500.0 + 499500 "LABELS" - 252067.0 + 252067 "OFFICE FURNISHINGS" - 2445700.0 + 2445700 "OFFICE MACHINES" - 9186301.0 + 9186301 "PAPER" - 1886099.0 + 1886099 "PENS & ART SUPPLIES" - 728282.0 + 728282 "RUBBER BANDS" - 59076.0 + 59076 "SCISSORS, RULERS AND TRIMMERS" - 717918.0 + 717918 "STORAGE & ORGANIZATION" - 3920902.0 + 3920902 "TABLES" - 8647254.0 + 8647254 "TELEPHONES AND COMMUNICATION" - 8361507.0 + 8361507 diff --git a/tdvt/tdvt/setup_env.py b/tdvt/tdvt/setup_env.py index 639d6ef0..fd8da77c 100644 --- a/tdvt/tdvt/setup_env.py +++ b/tdvt/tdvt/setup_env.py @@ -264,25 +264,24 @@ def get_tds_new_line(rmatch: Optional[re.Match[str]], mid_str: str, connection_p def updated_tds_as_str(f, connection_name) -> str: - r1 = re.compile('(^\s*)') - r2 = re.compile('(^\s*<.*relation connection=\').*?(\' .*>)') - r3 = re.compile('(^\s*)') - + r1 = re.compile('(^\s*)') # no space because of redshift_singlenode + r2 = re.compile('(^\s*<.*relation connection=\')(.*?)(\' .*>)') + r3 = re.compile('(^\s*)') new_tds = '' for line in f: new_line = line.rstrip() m1 = r1.match(line) if m1: - new_line = m1.group(1) + 'leaf' + m1.group(2) + new_line = m1.string.replace(m1.group(2), 'leaf') m2 = r2.match(line) if m2: - new_line = m2.group(1) + 'leaf' + m2.group(2) + new_line = m2.string.replace(m2.group(2), 'leaf') m3 = r3.match(line) if m3 and not 'tdvtconnection=\'' in line.lower(): - new_line = m3.group(1) + 'tdvtconnection=\'' + connection_name + m3.group(2) + new_line = f"{m3.group(1)} tdvtconnection='{connection_name}' {m3.group(3)}" new_tds += new_line + '\n' return new_tds @@ -308,4 +307,4 @@ def get_failed_cmd_line(cls, index): } cmd_line = 'python -m run-pattern {ds} --{test_type} {test_path} --tdp {tds_name}.tds'.format(**str_info) - return cmd_line \ No newline at end of file + return cmd_line diff --git a/tdvt/tdvt/version.py b/tdvt/tdvt/version.py index ce094cb0..0f42aae1 100644 --- a/tdvt/tdvt/version.py +++ b/tdvt/tdvt/version.py @@ -1 +1 @@ -__version__ = '2.13.4' +__version__ = '2.13.7'