Skip to content

Commit 2335ca0

Browse files
authored
Add proper underscore handling to float and complex types. (RustPython#5356)
1 parent e42c1a3 commit 2335ca0

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ rustpython-stdlib = { path = "stdlib", default-features = false, version = "0.3.
3030
rustpython-sre_engine = { path = "vm/sre_engine", version = "0.3.1" }
3131
rustpython-doc = { git = "https://github.com/RustPython/__doc__", tag = "0.3.0", version = "0.3.0" }
3232

33-
rustpython-literal = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
34-
rustpython-parser-core = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
35-
rustpython-parser = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
36-
rustpython-ast = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
37-
rustpython-format = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
33+
rustpython-literal = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
34+
rustpython-parser-core = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
35+
rustpython-parser = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
36+
rustpython-ast = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
37+
rustpython-format = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
3838
# rustpython-literal = { path = "../RustPython-parser/literal" }
3939
# rustpython-parser-core = { path = "../RustPython-parser/core" }
4040
# rustpython-parser = { path = "../RustPython-parser/parser" }

Lib/test/test_complex.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,6 @@ def test_constructor_negative_nans_from_string(self):
576576
self.assertEqual(copysign(1., complex("-nan-nanj").real), -1.)
577577
self.assertEqual(copysign(1., complex("-nan-nanj").imag), -1.)
578578

579-
# TODO: RUSTPYTHON
580-
@unittest.expectedFailure
581579
def test_underscores(self):
582580
# check underscores
583581
for lit in VALID_UNDERSCORE_LITERALS:

Lib/test/test_float.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ def test_float(self):
7272
def test_noargs(self):
7373
self.assertEqual(float(), 0.0)
7474

75-
# TODO: RUSTPYTHON
76-
@unittest.expectedFailure
7775
def test_underscores(self):
7876
for lit in VALID_UNDERSCORE_LITERALS:
7977
if not any(ch in lit for ch in 'jJxXoObB'):

0 commit comments

Comments
 (0)