summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--HACKING.md15
-rw-r--r--Makefile18
2 files changed, 19 insertions, 14 deletions
diff --git a/HACKING.md b/HACKING.md
index b8f62d86..57ac90e6 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -7,10 +7,11 @@ Coding Style
 * Use syntax compatible with Python `2.6+` and `3.1+`.
 * Use docstrings with `pydoc` in mind
 * Follow the PEP8 style guide: https://www.python.org/dev/peps/pep-0008/
-* Always run `make test` before submitting a new PR. `pylint` and `flake8` needs to be installed.
+* Always run `make test` before submitting a new PR. `pylint`, `flake8` and
+  `pytest` needs to be installed.
 * When breaking backward compatibility with old configuration files or plugins,
   please include a temporary workaround code that provides a compatibility
-  layer and mark it with a comment that includes the word `COMPAT`.  For
+  layer and mark it with a comment that includes the word `COMPAT`. For
   examples, grep the code for the word `COMPAT`. :)
 
 
@@ -23,7 +24,7 @@ Send patches, created with `git format-patch`, to the email address
 
 or open a pull request on GitHub.
 
-Please use PGP-encryption for security-relevand patches or messages.  The UIDs
+Please use PGP-encryption for security-relevand patches or messages. The UIDs
 of my key are `huterich <hut@lavabit.com>` and `hut <hut@hut.pm>`, my
 fingerprint is `1E9B 36EC 051F F6F7 FFC9 69A7 F08C E1E2 00FB 5CDF` and my full
 pubkey is at the very bottom of this file.
@@ -73,7 +74,7 @@ Adding colorschemes
 -------------------
 
 * Copy `ranger/colorschemes/default.py` to `ranger/colorschemes/myscheme.py`
-  and modify it according to your needs.  Alternatively, create a subclass of
+  and modify it according to your needs. Alternatively, create a subclass of
   `ranger.colorschemes.default.Default` and override the `use` method, as it is
   done in the `Jungle` colorscheme.
 
@@ -84,14 +85,14 @@ Adding colorschemes
 Change which programs start which file types
 --------------------------------------------
 
-Edit the configuration file `~/.config/ranger/rifle.conf`.  The default one can
+Edit the configuration file `~/.config/ranger/rifle.conf`. The default one can
 be obtained by running `ranger --copy-config rifle`.
 
 
 Change which file extensions have which mime type
 -------------------------------------------------
 
-Modify `ranger/data/mime.types`.  You may also add your own entries to `~/.mime.types`
+Modify `ranger/data/mime.types`. You may also add your own entries to `~/.mime.types`
 
 
 Change which files are previewed in the auto preview
@@ -104,7 +105,7 @@ PGP key
 =======
 
 You may wish to send the author (`hut@hut.pm`) PGP-encrypted mails for
-security-relevant messages.  This is the authors key.  Save everything from the
+security-relevant messages. This is the authors key. Save everything from the
 `BEGIN PGP PUBLIC KEY BLOCK` up until the `END PGP PUBLIC KEY BLOCK` message
 into a file and import it with `gpg --import <filename>`.
 
diff --git a/Makefile b/Makefile
index cd871d2e..f31053e4 100644
--- a/Makefile
+++ b/Makefile
@@ -67,23 +67,27 @@ TEST_PATHS_MAIN = \
 	tests
 TEST_PATH_CONFIG = ranger/config
 
-test:
+test_pylint:
 	@echo "Running pylint..."
 	pylint $(TEST_PATHS_MAIN)
 	pylint --rcfile=$(TEST_PATH_CONFIG)/pylintrc $(TEST_PATH_CONFIG)
+
+test_flake8:
 	@echo "Running flake8..."
 	flake8 $(TEST_PATHS_MAIN) $(TEST_PATH_CONFIG)
+
+test_doctest:
 	@echo "Running doctests..."
 	@for FILE in $(shell grep -IHm 1 doctest -r ranger | grep $(FILTER) | cut -d: -f1); do \
 		echo "Testing $$FILE..."; \
 		RANGER_DOCTEST=1 PYTHONPATH=".:"$$PYTHONPATH ${PYTHON} $$FILE; \
 	done
-	@if type py.test > /dev/null; then \
-		echo "Running py.test tests..."; \
-		py.test tests; \
-	else \
-		echo "WARNING: Couldn't run some tests because py.test is not installed!"; \
-	fi
+
+test_pytest:
+	echo "Running py.test tests..."
+	py.test tests
+
+test: test_pylint test_flake8 test_doctest test_pytest
 	@echo "Finished testing."
 
 man:
> 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603