fix: fix package imports and tests
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -3,9 +3,9 @@
|
|||||||
*.pyo
|
*.pyo
|
||||||
|
|
||||||
# Cache
|
# Cache
|
||||||
__pycache__/
|
**/__pycache__/
|
||||||
*.egg-info/
|
**/*.egg-info/
|
||||||
.pytest_cache/
|
**/.pytest_cache/
|
||||||
.coverage
|
.coverage
|
||||||
.htmlcov/
|
.htmlcov/
|
||||||
|
|
||||||
@@ -21,4 +21,4 @@ dist/
|
|||||||
build/
|
build/
|
||||||
|
|
||||||
# Generated test files
|
# Generated test files
|
||||||
tests/test.py
|
tests/*.py
|
||||||
|
|||||||
@@ -5,9 +5,15 @@ description = "Tamil code compiler"
|
|||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
||||||
[project.scripts]
|
[project.gui-scripts]
|
||||||
tampy = "tampy.cli:main"
|
tampy = "tampy.cli:main"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["src/tampy"]
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.sdist]
|
||||||
|
include = ["/src"]
|
||||||
|
|||||||
2
pytest.ini
Normal file
2
pytest.ini
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[pytest]
|
||||||
|
pythonpath = src
|
||||||
@@ -5,8 +5,8 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from src.tampy.transpiler import SimpleTranspiler
|
from .transpiler import SimpleTranspiler
|
||||||
from src.tampy.keywords import load_keywords
|
from .keywords import load_keywords
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
import ast
|
import ast
|
||||||
import pytest
|
import pytest
|
||||||
from src.tampy.transpiler import SimpleTranspiler
|
import sys
|
||||||
|
sys.path.insert(0, "..")
|
||||||
|
from tampy.transpiler import SimpleTranspiler
|
||||||
|
|
||||||
|
|
||||||
def test_simple_transpile():
|
def test_simple_transpile():
|
||||||
|
|||||||
Reference in New Issue
Block a user