<s> import os <EOL> from . conftest import ROOT , FILES <EOL> from gitman . commands import _find_root , install , update , display , delete <EOL> PROJECT_ROOT = os . path . dirname ( os . path . dirname ( ROOT ) ) <EOL> PROJECT_PARENT = os . path . dirname ( PROJECT_ROOT ) <EOL> class TestCommands : <EOL> def test_commands_can_be_run_without_project ( self , tmpdir ) : <EOL> tmpdir . chdir ( ) <EOL> assert not install ( ) <EOL> assert not update ( ) <EOL> assert not display ( ) <EOL> assert not delete ( ) <EOL> class TestFindRoot : <EOL> def test_specified ( self ) : <EOL> os . chdir ( PROJECT_PARENT ) <EOL> assert FILES == _find_root ( FILES ) <EOL> def test_none ( self ) : <EOL> assert PROJECT_ROOT == _find_root ( None , cwd = ROOT ) <EOL> def test_current ( self ) : <EOL> assert PROJECT_ROOT == _find_root ( PROJECT_ROOT , cwd = ROOT ) <EOL> def test_missing ( self ) : <EOL> assert PROJECT_PARENT == _find_root ( None , cwd = PROJECT_PARENT ) </s>
