File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55def test_import ():
66 """Test that the package can be imported."""
77 import stylometry
8+
89 assert hasattr (stylometry , "main" )
910 assert hasattr (stylometry , "__version__" )
1011
1112
1213def test_version ():
1314 """Test that version is a valid string."""
1415 from stylometry import __version__
16+
1517 assert isinstance (__version__ , str )
1618 assert len (__version__ .split ("." )) >= 2
1719
1820
1921def test_cli_help (capsys ):
2022 """Test that CLI help works."""
21- from stylometry import main
2223 import sys
23-
24+
25+ from stylometry import main
26+
2427 # Capture the help output
2528 with pytest .raises (SystemExit ) as exc_info :
2629 main (["--help" ])
27-
30+
2831 assert exc_info .value .code == 0
2932 captured = capsys .readouterr ()
3033 assert "stylometric" in captured .out .lower () or "corpus" in captured .out .lower ()
You can’t perform that action at this time.
0 commit comments