Skip to content

Commit 03bda85

Browse files
committed
Clean test code
1 parent 188798a commit 03bda85

File tree

9 files changed

+17
-143
lines changed

9 files changed

+17
-143
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,12 @@ Or use pip to install extra modules:
3030

3131
# Code organization
3232

33-
- parser: python lexing, parsing and ast
34-
- vm: python virtual machine
35-
- src: using the other subcrates to bring rustpython to life.
36-
37-
The files in the top level directory are from [windelbouwman/rspython][rspython] which contains an implementation of the parser and vm in `src/`
38-
39-
An alternative implementation of python virtual machine that are compatible with CPython parser are from [shinglyu/RustPython][rustpython] and is located in the `VM/` folder.
40-
41-
We are in the process of merging the two implementation to form a single implementation.
33+
- `parser`: python lexing, parsing and ast
34+
- `vm`: python virtual machine
35+
- `src`: using the other subcrates to bring rustpython to life.
36+
- `docs`: documentation (work in progress)
37+
- `py_code_object`: CPython bytecode to rustpython bytecode convertor (work in progress)
38+
- `tests`: integration test snippets
4239

4340
# Community
4441

@@ -48,12 +45,13 @@ Chat with us on [gitter][gitter].
4845

4946
The initial work was based on [windelbouwman/rspython](https://github.com/windelbouwman/rspython) and [shinglyu/RustPython](https://github.com/shinglyu/RustPython)
5047

51-
[rspython]: https://github.com/windelbouwman/rspython
52-
[rustpython]: https://github.com/shinglyu/RustPython
5348
[gitter]: https://gitter.im/rustpython/Lobby
5449

5550
# Links
5651

5752
These are some useful links to related projects:
5853

5954
- https://github.com/ProgVal/pythonvm-rust
55+
- https://github.com/shinglyu/RustPython
56+
- https://github.com/windelbouwman/rspython
57+

py_code_object/init_env.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

py_code_object/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

py_code_object/test.sh

Lines changed: 0 additions & 43 deletions
This file was deleted.

py_code_object/test_all.bat

Lines changed: 0 additions & 11 deletions
This file was deleted.

py_code_object/test_all.sh

Lines changed: 0 additions & 65 deletions
This file was deleted.
File renamed without changes.

tests/test_snippets.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ def test_function(self):
8383
setattr(cls, test_function_name, test_function)
8484

8585

86-
def populate(cls):
87-
""" Decorator function which can populate a unittest.TestCase class """
88-
for method in ['cpython', 'cpython_bytecode', 'rustpython']:
86+
def populate(method):
87+
def wrapper(cls):
88+
""" Decorator function which can populate a unittest.TestCase class """
8989
for filename in get_test_files():
9090
create_test_function(cls, filename, method)
91-
return cls
91+
return cls
92+
return wrapper
9293

9394

9495
def get_test_files():
@@ -102,6 +103,8 @@ def get_test_files():
102103
yield os.path.abspath(filepath)
103104

104105

105-
@populate
106+
@populate('cpython')
107+
# @populate('cpython_bytecode')
108+
@populate('rustpython')
106109
class SampleTestCase(unittest.TestCase):
107110
pass

0 commit comments

Comments
 (0)