fixup! Add standard python build files
This commit is contained in:
parent
9ec95d99f1
commit
bfb2153eb8
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
from imp import load_source
|
||||
from pathlib import Path
|
||||
from click.testing import CliRunner
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
CONTENT = "content"
|
||||
|
||||
import ipdb; ipdb.set_trace()
|
||||
ordigi = load_source('cli', str(Path(__file__).parent.parent) + 'cli.py')
|
||||
|
||||
class TestOrdigi:
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_class(cls, sample_files_paths):
|
||||
cls.runner = CliRunner()
|
||||
cls.src_path, cls.file_paths = sample_files_paths
|
||||
|
||||
def test__sort(self):
|
||||
import ipdb; ipdb.set_trace()
|
||||
result = self.runner.invoke(cli._sort, [str(self.src_path)])
|
||||
|
||||
|
||||
def test_needsfiles(tmpdir):
|
||||
assert tmpdir
|
||||
|
||||
|
||||
def test_create_file(tmp_path):
|
||||
directory = tmp_path / "sub"
|
||||
directory.mkdir()
|
||||
path = directory / "hello.txt"
|
||||
path.write_text(CONTENT)
|
||||
assert path.read_text() == CONTENT
|
||||
assert len(list(tmp_path.iterdir())) == 1
|
|
@ -1,19 +0,0 @@
|
|||
import pytest
|
||||
|
||||
CONTENT = "content"
|
||||
|
||||
class TestOrdigi:
|
||||
@pytest.mark.skip()
|
||||
def test__sort(self):
|
||||
assert 0
|
||||
|
||||
def test_needsfiles(tmpdir):
|
||||
assert tmpdir
|
||||
|
||||
def test_create_file(tmp_path):
|
||||
d = tmp_path / "sub"
|
||||
d.mkdir()
|
||||
p = d / "hello.txt"
|
||||
p.write_text(CONTENT)
|
||||
assert p.read_text() == CONTENT
|
||||
assert len(list(tmp_path.iterdir())) == 1
|
|
@ -0,0 +1,12 @@
|
|||
# Create virtual environment
|
||||
nmkvirtualenv ordigi
|
||||
|
||||
# Work on it (activate and cd)
|
||||
workon ordigi
|
||||
|
||||
# Install required dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Install it
|
||||
pip install -e .
|
||||
|
Loading…
Reference in New Issue