diff tests/conftest.py @ 397:879b6b5647a8

tests: Move all bakes/cli/servings tests files to have a YAML extension.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 18 May 2015 15:48:45 -0700
parents 3e4bb57d8506
children af17c143b9ab
line wrap: on
line diff
--- a/tests/conftest.py	Mon May 18 15:35:52 2015 -0700
+++ b/tests/conftest.py	Mon May 18 15:48:45 2015 -0700
@@ -29,12 +29,13 @@
 
 
 def pytest_collect_file(parent, path):
-    if path.basename.startswith("test"):
-        if path.ext == ".bake":
+    if path.ext == '.yaml' and path.basename.startswith("test"):
+        category = os.path.basename(path.dirname)
+        if category == 'bakes':
             return BakeTestFile(path, parent)
-        elif path.ext == ".chef":
+        elif category == 'cli':
             return ChefTestFile(path, parent)
-        elif path.ext == ".serve":
+        elif category == 'servings':
             return ServeTestFile(path, parent)