EX47, cannot import Room

Hey, I’m working through learining python the hard way, and have run into an issue with understanding nosetests; in ex47, I’m getting the error

ImportError: cannot import name ‘Room’ from ‘ex47.game’

Any idea whats going on?

Hey @JezzaS, welcome to the forum. :slight_smile:

The standard advice on this forum is “Use pytest instead of nose”, because pytest is better and just works.

Anyway, if you want us to help, you need to give us some more info. To begin with, show us your directory layout and the test file.

Yeah, I have to go with @florian on this one. You can install pytest instead of nose, and remove nose. Then use the PyTest docs to rewrite the tests:

https://docs.pytest.org/en/stable/

If you tell me what OS you’re on I can figure out why this might be happening.