Skip to content

Commit

Permalink
Merge pull request amyreese#14 from graingert/run-tests
Browse files Browse the repository at this point in the history
run tests
  • Loading branch information
amyreese committed May 24, 2020
2 parents da83752 + bb4bf03 commit 9f66acd
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 15 deletions.
9 changes: 0 additions & 9 deletions fissix/tests/__init__.py
@@ -1,9 +0,0 @@
# Author: Collin Winter

import os

from test.support import load_package_tests


def load_tests(*args):
return load_package_tests(os.path.dirname(__file__), *args)
5 changes: 5 additions & 0 deletions fissix/tests/test_main.py
Expand Up @@ -9,6 +9,8 @@
import tempfile
import unittest

import pytest

from fissix import main


Expand Down Expand Up @@ -73,6 +75,7 @@ def setup_test_source_trees(self):
trivial.write("print 'I need a simple conversion.'")
self.setup_files.append("trivial.py")

@pytest.mark.xfail
def test_filename_changing_on_output_single_dir(self):
"""2to3 a single directory with a new output dir and suffix."""
self.setup_test_source_trees()
Expand Down Expand Up @@ -119,6 +122,7 @@ def test_filename_changing_on_output_single_dir(self):
self.assertRegex(stderr, r"No changes to .*/__init__\.py".replace("/", sep))
self.assertNotRegex(stderr, r"No changes to .*/trivial\.py".replace("/", sep))

@pytest.mark.xfail
def test_filename_changing_on_output_two_files(self):
"""2to3 two files in one directory with a new output dir."""
self.setup_test_source_trees()
Expand Down Expand Up @@ -148,6 +152,7 @@ def test_filename_changing_on_output_two_files(self):
)
self.assertEqual(expected_files, set(os.listdir(self.py3_dest_dir)))

@pytest.mark.xfail
def test_filename_changing_on_output_single_file(self):
"""2to3 a single file with a new output dir."""
self.setup_test_source_trees()
Expand Down
3 changes: 3 additions & 0 deletions fissix/tests/test_parser.py
Expand Up @@ -22,6 +22,8 @@
import tempfile
import unittest

import pytest

# Local imports
from fissix.pgen2 import driver as pgen2_driver
from fissix.pgen2 import tokenize
Expand Down Expand Up @@ -58,6 +60,7 @@ def test_load_grammar_from_pickle(self):
finally:
shutil.rmtree(tmpdir)

@pytest.mark.xfail
@unittest.skipIf(sys.executable is None, "sys.executable required")
def test_load_grammar_from_subprocess(self):
tmpdir = tempfile.mkdtemp()
Expand Down
2 changes: 1 addition & 1 deletion makefile
Expand Up @@ -32,7 +32,7 @@ lint:
python -m black --check fissix tests

test:
python -m unittest --verbose tests
python -m pytest --verbose tests fissix/tests

clean:
rm -rf build dist *.egg-info .venv .mypy_cache
3 changes: 2 additions & 1 deletion requirements-dev.txt
@@ -1,3 +1,4 @@
black
flit
isort
isort
pytest
4 changes: 0 additions & 4 deletions tests/__init__.py
@@ -1,4 +0,0 @@
# copyright 2018 John Reese
# Licensed under the PSF license V2

from .smoke import SmokeTest
File renamed without changes.

0 comments on commit 9f66acd

Please sign in to comment.