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